Reading JSON from a text file

前端 未结 7 1459
隐瞒了意图╮
隐瞒了意图╮ 2021-02-09 01:30

I know of some JSON libs around and I\'m currently looking into Google-JSON but all I want to achieve is something simple and I want to know what you would suggest.

I wa

相关标签:
7条回答
  • 2021-02-09 02:12

    I recommend this library: http://www.json.org/java/

    You simply have to create a JSONObject from string, and get the name proprety.

    JSONObject JsonObj = JSONObject( InputStr );
    String MapTitle = JsonObj.getString("title");
    

    Download the source, and import it into your project: http://www.json.org/java/json.zip

    0 讨论(0)
提交回复
热议问题