V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
guyeuro
V2EX  ›  问与答

fastjson 里 JSONObject.toJSONString 和 JSON.toJSONString()有啥区别?

  •  
  •   guyeuro · 2017-09-11 17:59:29 +08:00 · 9192 次点击
    这是一个创建于 2411 天前的主题,其中的信息可能已经有所发展或是发生改变。
    3 条回复    2018-01-20 16:14:29 +08:00
    kevinzhwl
        1
    kevinzhwl  
       2017-09-11 21:02:46 +08:00 via iPhone
    印象中 jsonobject 继承自 json
    点进去看代码呗
    shenhb
        2
    shenhb  
       2017-09-12 09:15:25 +08:00
    看这字面意思 JSONObject.toJSONString 不就是 json 对象转化为 json 字符串吗? 后者应该是重写的 toSting 方法,
    loongwang
        3
    loongwang  
       2018-01-20 16:14:29 +08:00
    就是在内部又调用了一下 toJSONString.............
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1049 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 22:41 · PVG 06:41 · LAX 15:41 · JFK 18:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.