1 | JSON in Java [package org.json]
|
---|
2 |
|
---|
3 | Douglas Crockford
|
---|
4 | [email protected]
|
---|
5 |
|
---|
6 | 2011-02-02
|
---|
7 |
|
---|
8 |
|
---|
9 | JSON is a light-weight, language independent, data interchange format.
|
---|
10 | See http://www.JSON.org/
|
---|
11 |
|
---|
12 | The files in this package implement JSON encoders/decoders in Java.
|
---|
13 | It also includes the capability to convert between JSON and XML, HTTP
|
---|
14 | headers, Cookies, and CDL.
|
---|
15 |
|
---|
16 | This is a reference implementation. There is a large number of JSON packages
|
---|
17 | in Java. Perhaps someday the Java community will standardize on one. Until
|
---|
18 | then, choose carefully.
|
---|
19 |
|
---|
20 | The license includes this restriction: "The software shall be used for good,
|
---|
21 | not evil." If your conscience cannot live with that, then choose a different
|
---|
22 | package.
|
---|
23 |
|
---|
24 | The package compiles on Java 1.2 thru Java 1.4.
|
---|
25 |
|
---|
26 |
|
---|
27 | JSONObject.java: The JSONObject can parse text from a String or a JSONTokener
|
---|
28 | to produce a map-like object. The object provides methods for manipulating its
|
---|
29 | contents, and for producing a JSON compliant object serialization.
|
---|
30 |
|
---|
31 | JSONArray.java: The JSONObject can parse text from a String or a JSONTokener
|
---|
32 | to produce a vector-like object. The object provides methods for manipulating
|
---|
33 | its contents, and for producing a JSON compliant array serialization.
|
---|
34 |
|
---|
35 | JSONTokener.java: The JSONTokener breaks a text into a sequence of individual
|
---|
36 | tokens. It can be constructed from a String, Reader, or InputStream.
|
---|
37 |
|
---|
38 | JSONException.java: The JSONException is the standard exception type thrown
|
---|
39 | by this package.
|
---|
40 |
|
---|
41 |
|
---|
42 | JSONString.java: The JSONString interface requires a toJSONString method,
|
---|
43 | allowing an object to provide its own serialization.
|
---|
44 |
|
---|
45 | JSONStringer.java: The JSONStringer provides a convenient facility for
|
---|
46 | building JSON strings.
|
---|
47 |
|
---|
48 | JSONWriter.java: The JSONWriter provides a convenient facility for building
|
---|
49 | JSON text through a writer.
|
---|
50 |
|
---|
51 |
|
---|
52 | CDL.java: CDL provides support for converting between JSON and comma
|
---|
53 | delimited lists.
|
---|
54 |
|
---|
55 | Cookie.java: Cookie provides support for converting between JSON and cookies.
|
---|
56 |
|
---|
57 | CookieList.java: CookieList provides support for converting between JSON and
|
---|
58 | cookie lists.
|
---|
59 |
|
---|
60 | HTTP.java: HTTP provides support for converting between JSON and HTTP headers.
|
---|
61 |
|
---|
62 | HTTPTokener.java: HTTPTokener extends JSONTokener for parsing HTTP headers.
|
---|
63 |
|
---|
64 | XML.java: XML provides support for converting between JSON and XML.
|
---|
65 |
|
---|
66 | JSONML.java: JSONML provides support for converting between JSONML and XML.
|
---|
67 |
|
---|
68 | XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text. |
---|