helloworld12
V2EX  ›  问与答

golang 一个奇怪的现象

  •  
  •   helloworld12 · Jul 8, 2018 · 1756 views
    This topic created in 3053 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   ·   989 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 18:25 · PVG 02:25 · LAX 10:25 · JFK 13:25
    ♥ Do have faith in what you're doing.