de.unkrig.commons.text.json
Class JsonParser
java.lang.Object
de.unkrig.commons.text.parser.AbstractParser<JsonScanner.TokenType>
de.unkrig.commons.text.json.JsonParser
public class JsonParser
- extends AbstractParser<JsonScanner.TokenType>
Parser for a 'parametrized value' of an HTTP header like:
Content-Type: text/plain; charset=ASCII
'text/plain' is the so-called 'token', 'char=ASCII' is a so-called 'parameter'.
| Methods inherited from class de.unkrig.commons.text.parser.AbstractParser |
eoi, peek, peek, peek, peek, peekRead, peekRead, peekRead, peekRead, peekReadEnum, read, read, read, read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonParser
public JsonParser(ProducerWhichThrows<AbstractScanner.Token<JsonScanner.TokenType>,ScanException> scanner)
JsonParser
public JsonParser(java.io.Reader r)
parseObject
public Json.ObjecT parseObject()
throws java.io.IOException,
ParseException
object := '{' [ member { ',' member } ] '}'
member := string ':' value
- Throws:
java.io.IOException
ParseException
parseValue
public Json.Value parseValue()
throws java.io.IOException,
ParseException
value :=
string
| number
| object
| array
| 'true'
| 'false'
| 'null'
- Throws:
java.io.IOException
ParseException
parseArray
public Json.Value parseArray()
throws java.io.IOException,
ParseException
array := '[' [ value { ',' value } ] ']'
- Throws:
java.io.IOException
ParseException