我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用Golang解码PHP序列化Redis响应

I have a problem with my Redis db, it is encoded with PHP serialized protocol but I don't how I can decode this data using Golang, is there something like JSON Unmarshall/Marshall for this?

To read such data in your Go program you will have to reimplement unserialize PHP function in Go. I doubt it is an easy task though.

A better solution would be to use a portable format to store data in Redis, such as JSON or Google Protobuf.

I found this https://github.com/wulijun/go-php-serialize i don't know if you already use it

近期文章

  • 不为我自己的软件包使用回购路径的含义
  • 如何在内存中布局结构数组?
  • http.newRequest不发送帖子数据
  • 修复数组替换中引用不正确的切片
  • 关闭浏览器后停止Go服务器
  • 我应该如何组织我的go文件以支持跨平台构建和实施一致性?
  • 将类型断言nil转到指针类型[重复]
  • 将非切片附加到切片图
  • 将函数与标量或切片一起使用
  • 从Go中的tar文件中提取
  • Golang-使用/迭代JSON解析地图
  • 唯一性约束不会阻止在Neo4j上添加相同的数据
  • 为什么我们可以使用未使用的函数,但不能使用未使用的变量?
  • 关于Go中的接口
  • Golang:此类型实现哪种接口?
  • 如何在Go中将自定义格式的时间序列化到xml中/从xml序列化?
  • Go Martini中的Auth0
  • Golang进口问题
  • Golang的_byteswap_ulong
  • 在Go中参数化SQL查询

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华