doutan5798 2015-10-08 09:06 采纳率: 100%
浏览 149
已采纳

如何使用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?

  • 写回答

2条回答 默认 最新

  • dpsyssiv90846 2015-10-08 11:06
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?