mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
add Javadoc and rename parameters to speaking variable names
This commit is contained in:
parent
ca1c6830c9
commit
215f4268bf
@ -38,7 +38,18 @@ public class JSONTokener {
|
|||||||
/**
|
/**
|
||||||
* Construct a JSONTokener from a Reader. The caller must close the Reader.
|
* Construct a JSONTokener from a Reader. The caller must close the Reader.
|
||||||
*
|
*
|
||||||
* @param reader A reader.
|
* @param reader the source.
|
||||||
|
*/
|
||||||
|
public JSONTokener(Reader reader) {
|
||||||
|
this(reader, new JSONParserConfiguration());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a JSONTokener from a Reader with a given JSONParserConfiguration. The caller must close the Reader.
|
||||||
|
*
|
||||||
|
* @param reader the source.
|
||||||
|
* @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public JSONTokener(Reader reader, JSONParserConfiguration jsonParserConfiguration) {
|
public JSONTokener(Reader reader, JSONParserConfiguration jsonParserConfiguration) {
|
||||||
this.jsonParserConfiguration = jsonParserConfiguration;
|
this.jsonParserConfiguration = jsonParserConfiguration;
|
||||||
@ -54,10 +65,6 @@ public class JSONTokener {
|
|||||||
this.line = 1;
|
this.line = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONTokener(Reader reader) {
|
|
||||||
this(reader, new JSONParserConfiguration());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
|
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
|
||||||
* @param inputStream The source.
|
* @param inputStream The source.
|
||||||
@ -69,6 +76,7 @@ public class JSONTokener {
|
|||||||
/**
|
/**
|
||||||
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
|
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
|
||||||
* @param inputStream The source.
|
* @param inputStream The source.
|
||||||
|
* @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
|
||||||
*/
|
*/
|
||||||
public JSONTokener(InputStream inputStream, JSONParserConfiguration jsonParserConfiguration) {
|
public JSONTokener(InputStream inputStream, JSONParserConfiguration jsonParserConfiguration) {
|
||||||
this(new InputStreamReader(inputStream, Charset.forName("UTF-8")), jsonParserConfiguration);
|
this(new InputStreamReader(inputStream, Charset.forName("UTF-8")), jsonParserConfiguration);
|
||||||
@ -78,14 +86,19 @@ public class JSONTokener {
|
|||||||
/**
|
/**
|
||||||
* Construct a JSONTokener from a string.
|
* Construct a JSONTokener from a string.
|
||||||
*
|
*
|
||||||
* @param s A source string.
|
* @param source A source string.
|
||||||
*/
|
*/
|
||||||
public JSONTokener(String s) {
|
public JSONTokener(String source) {
|
||||||
this(new StringReader(s));
|
this(new StringReader(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONTokener(String s, JSONParserConfiguration jsonParserConfiguration) {
|
/**
|
||||||
this(new StringReader(s), jsonParserConfiguration);
|
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
|
||||||
|
* @param source The source.
|
||||||
|
* @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
|
||||||
|
*/
|
||||||
|
public JSONTokener(String source, JSONParserConfiguration jsonParserConfiguration) {
|
||||||
|
this(new StringReader(source), jsonParserConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user