作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我的 Redis 数据库有问题,它是用 PHP 序列化协议(protocol)编码的,但我不知道如何使用 Golang 解码这些数据,是否有类似 JSON Unmarshall/Marshall 的东西?
最佳答案
要在您的 Go 程序中读取此类数据,您必须在 Go 中重新实现 unserialize
PHP 函数。不过,我怀疑这是一项容易的任务。
更好的解决方案是使用可移植格式在 Redis 中存储数据,例如 JSON 或 Google Protobuf。
关于php - 如何用 Golang 解码 PHP 序列化的 Redis 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33011305/
我是一名优秀的程序员,十分优秀!