public interface JSONBuilder
JSONXxxxBuilder classes, which consume a stream of characters representing a
JSON value and return the parsed value.| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptChar(int ch)
Accept a character as part of the JSON, and return
true if the character has been consumed. |
static void |
checkWhitespace(int ch) |
default void |
close()
Close the builder.
|
net.pwall.json.JSONValue |
getResult()
Get the
JSONValue result. |
boolean |
isComplete()
Test whether the JSON being parsed by this builder is complete.
|
static boolean |
isWhitespace(int ch)
Test a character for whitespace.
|
boolean isComplete()
true if the JSON is completenet.pwall.json.JSONValue getResult()
JSONValue result.net.pwall.json.JSONException - if the JSON is not completeboolean acceptChar(int ch)
true if the character has been consumed. The
character is in the form of a Unicode code point; since all of the syntactic elements of JSON fall within the
ASCII subset, the only place this is relevant is inside strings.ch - the charactertrue if the character has been consumednet.pwall.json.JSONException - if the character is not validdefault void close()
net.pwall.json.JSONException - if the JSON is not completestatic boolean isWhitespace(int ch)
ch - the charactertrue if the character is whitespacestatic void checkWhitespace(int ch)
Copyright © 2021. All rights reserved.