helloworld12
V2EX  ›  问与答

golang 一个奇怪的现象

  •  
  •   helloworld12 · Jul 8, 2018 · 1760 views
    This topic created in 3057 days ago, the information mentioned may be changed or developed.

    可能是我某块基础知识没掌握好

    一个 struct 连续 json,两次 输出会变成 base64....

    2 replies  •  2018-07-08 02:20:48 +08:00
    yanjinbin
    yanjinbin
    Jul 8, 2018 via iPhone❤️1
    1
    那就对了。。。啥奇怪,不是 base643 应该是 code point
    mhycy
    mhycy
    Jul 8, 2018❤️2
    2
    字节码会转码成 Base64 编码的字符串,默认行为没毛病
    参考地址 https://golang.org/pkg/encoding/json/#Marshal
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4337 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:15 · PVG 15:15 · LAX 23:15 · JFK 02:15
    ♥ Do have faith in what you're doing.