golang-json-int64-bug

Go语言在将int64进行JSON解析时,会出现几百或几千的小的偏移。解决方法时将int64转化成string表示。
比如,将

1
controller.Data["json"] = map[string]int64{"MomentId": MomentId}

改为

1
controller.Data["json"] = map[string]string{"MomentId": strconv.FormatInt(MomentId, 10)}
Android Studio 上手笔记 DNS欺骗攻击

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×