Class JsonParser
java.lang.Object
org.htmlunit.corejs.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 void
consume
(char token) private void
private static int
fromHex
(char c) private char
nextOrNumberError
(int numberStart) private JsonParser.ParseException
numberError
(int start, int end) parseValue
(String json) private Object
private void
private Boolean
private Object
readNull()
private Number
readNumber
(char c) private Object
private String
private Boolean
readTrue()
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
-