JSON.simple

码农软件 · 软件分类 · JSON/BSON开发包 · 2019-04-02 07:29:06

软件介绍

JSON.simple是一个简单的Java类库,用于解析和生成JSON文本。不依赖于其它类库,性能高。

示例代码:

  System.out.println("=======decode=======");
               
  String s="[0,{\"1\":{\"2\":{\"3\":{\"4\":[5,{\"6\":7}]}}}}]";
  Object obj=JSONValue.parse(s);
  JSONArray array=(JSONArray)obj;
  System.out.println("======the 2nd element of array======");
  System.out.println(array.get(1));
  System.out.println();
               
  JSONObject obj2=(JSONObject)array.get(1);
  System.out.println("======field \"1\"==========");
  System.out.println(obj2.get("1"));   

               
  s="{}";
  obj=JSONValue.parse(s);
  System.out.println(obj);
               
  s="[5,]";
  obj=JSONValue.parse(s);
  System.out.println(obj);
               
  s="[5,,2]";
  obj=JSONValue.parse(s);
  System.out.println(obj);

本文地址:https://www.codercto.com/soft/d/2673.html

Lean Analytics

Lean Analytics

Alistair Croll、Benjamin Yoskovitz / O'Reilly Media / 2013-3-18 / USD 29.99

If you're involved with a startup, analytics help you find your way to the right product and market before the money runs out. But with a flood of information available, where do you start? This book ......一起来看看 《Lean Analytics》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具