public enum JsonParserOption extends Enum<JsonParserOption>
JsonParserBuilder on JsonParser construction specify what
input is considered as "valid" JSON, i. e. don't cause
ParseException.| Enum Constant and Description |
|---|
ALLOW_COMMENTS
Ignore JavaScript-style comments present in JSON input.
|
ALLOW_PARTIAL_VALUES
When
JsonParser.parse(net.openhft.lang.io.Bytes) is called the parser will
check that the top level value was completely consumed. |
DONT_VALIDATE_STRINGS
When this option is set, the
JsonParser will verify that all strings in JSON input
are valid UTF8 and will emit a ParseException if this is not so. |
| Modifier and Type | Method and Description |
|---|---|
static JsonParserOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonParserOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonParserOption ALLOW_COMMENTS
Examples:
{
"foo": 1, // comment till the end of line
"bar": /* inline comment */ 2
}
public static final JsonParserOption DONT_VALIDATE_STRINGS
JsonParser will verify that all strings in JSON input
are valid UTF8 and will emit a ParseException if this is not so. When set,
this option makes parsing slightly more expensive (~7% depending on processor and compiler
in use).public static final JsonParserOption ALLOW_PARTIAL_VALUES
JsonParser.parse(net.openhft.lang.io.Bytes) is called the parser will
check that the top level value was completely consumed. I. e., if called whilst in the middle
of parsing a value yajl will throw a ParseException. Setting this
option suppresses that check and the corresponding exception.public static JsonParserOption[] values()
for (JsonParserOption c : JsonParserOption.values()) System.out.println(c);
public static JsonParserOption valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullCopyright © 2014. All rights reserved.