-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Home
Sean Leary edited this page Dec 9, 2018
·
13 revisions
JSON-Java is a reference application for reading and writing JSON docs in Java. It was written by Douglas Crockford, who first specified the JSON document format. It works by parsing and storing JSON text inside of POJOs - Plain Old Java Objects. This allows your Java code to navigate into the doc, read, and update values as needed via the JSON-Java API. Then the JSON text can be written out again.
These are the primary classes, which you will interact with the most:
- JSONObject: Stores JSON objects, which are enclosed in curly braces. { "hello" : "world" }
- JSONArray: Stores JSON arrays, which are enclosed in square brackets: [ "hello", "world" ]