guyeuro
V2EX  ›  问与答

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

  •  
  •   guyeuro · Sep 11, 2017 · 10051 views
    This topic created in 3179 days ago, the information mentioned may be changed or developed.
    3 replies    2018-01-20 16:14:29 +08:00
    kevinzhwl
        1
    kevinzhwl  
       Sep 11, 2017 via iPhone
    印象中 jsonobject 继承自 json
    点进去看代码呗
    shenhb
        2
    shenhb  
       Sep 12, 2017
    看这字面意思 JSONObject.toJSONString 不就是 json 对象转化为 json 字符串吗? 后者应该是重写的 toSting 方法,
    loongwang
        3
    loongwang  
       Jan 20, 2018
    就是在内部又调用了一下 toJSONString.............
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2657 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:42 · PVG 23:42 · LAX 08:42 · JFK 11:42
    ♥ Do have faith in what you're doing.