mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
hygiene
This commit is contained in:
parent
667813de3c
commit
68de4feaec
2 changed files with 55 additions and 59 deletions
|
@ -197,9 +197,7 @@ public class JSONObject {
|
|||
key = x.nextValue().toString();
|
||||
}
|
||||
|
||||
/*
|
||||
* The key is followed by ':'. We will also tolerate '=' or '=>'.
|
||||
*/
|
||||
// The key is followed by ':'. We will also tolerate '=' or '=>'.
|
||||
|
||||
c = x.nextClean();
|
||||
if (c == '=') {
|
||||
|
@ -211,9 +209,7 @@ public class JSONObject {
|
|||
}
|
||||
putOnce(key, x.nextValue());
|
||||
|
||||
/*
|
||||
* Pairs are separated by ','. We will also tolerate ';'.
|
||||
*/
|
||||
// Pairs are separated by ','. We will also tolerate ';'.
|
||||
|
||||
switch (x.nextClean()) {
|
||||
case ';':
|
||||
|
@ -1230,7 +1226,7 @@ public class JSONObject {
|
|||
* @param s A String.
|
||||
* @return A simple JSON value.
|
||||
*/
|
||||
static public Object stringToValue(String s) {
|
||||
public static Object stringToValue(String s) {
|
||||
if (s.equals("")) {
|
||||
return s;
|
||||
}
|
||||
|
|
10
README
10
README
|
@ -25,15 +25,15 @@ The package compiles on Java 1.2 thru Java 1.4.
|
|||
|
||||
|
||||
JSONObject.java: The JSONObject can parse text from a String or a JSONTokener
|
||||
to produce a map-like object. The object provides methods of manipulating its
|
||||
contents, and for producing a JSON compliant serialization.
|
||||
to produce a map-like object. The object provides methods for manipulating its
|
||||
contents, and for producing a JSON compliant object serialization.
|
||||
|
||||
JSONArray.java: The JSONObject can parse text from a String or a JSONTokener
|
||||
to produce a vector-like object. The object provides methods of manipulating
|
||||
its contents, and for producing a JSON compliant serialization.
|
||||
to produce a vector-like object. The object provides methods for manipulating
|
||||
its contents, and for producing a JSON compliant array serialization.
|
||||
|
||||
JSONTokenizer.java: The JSONTokener breaks a text into a sequence of individual
|
||||
tokens. It can be constructed from a String,Reader, or InputStream.
|
||||
tokens. It can be constructed from a String, Reader, or InputStream.
|
||||
|
||||
JSONException.java: The JSONException is the standard exception type thrown
|
||||
by this package.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue