Package org.mozilla.javascript.json
Class JsonParser
java.lang.Object
org.mozilla.javascript.json.JsonParser
This class converts a stream of JSON tokens into a JSON value.
See ECMA 15.12.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconsume(char token) private voidprivate static intfromHex(char c) private charnextOrNumberError(int numberStart) private JsonParser.ParseExceptionnumberError(int start, int end) parseValue(String json) private Objectprivate voidprivate Booleanprivate ObjectreadNull()private NumberreadNumber(char c) private Objectprivate Stringprivate BooleanreadTrue()private Object
-
Field Details
-
cx
-
scope
-
pos
private int pos -
length
private int length -
src
-
-
Constructor Details
-
JsonParser
-
-
Method Details
-
parseValue
- Throws:
JsonParser.ParseException
-
readValue
- Throws:
JsonParser.ParseException
-
readObject
- Throws:
JsonParser.ParseException
-
readArray
- Throws:
JsonParser.ParseException
-
readString
- Throws:
JsonParser.ParseException
-
fromHex
private static int fromHex(char c) -
readNumber
- Throws:
JsonParser.ParseException
-
numberError
-
nextOrNumberError
- Throws:
JsonParser.ParseException
-
readDigits
private void readDigits() -
readTrue
- Throws:
JsonParser.ParseException
-
readFalse
- Throws:
JsonParser.ParseException
-
readNull
- Throws:
JsonParser.ParseException
-
consumeWhitespace
private void consumeWhitespace() -
consume
- Throws:
JsonParser.ParseException
-