Class JsonValues
java.lang.Object
com.darkcollective.relix.value.internal.JsonValues
Parses JSON text into the relix
Value hierarchy — the boundary at which
a nested document becomes native relix data:
- object →
StructValue - array →
ArrayValue - string →
StringValue - number →
NumberValue(aBigDecimal) true/false→BooleanValuenull→NullValue
A hand-rolled recursive-descent parser (the project avoids third-party JSON
dependencies). Malformed input throws JsonValues.JsonParseException.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThrown when the input is not well-formed JSON. -
Method Summary
-
Method Details
-
parse
Parses a single JSON value (object, array, string, number, boolean, or null).- Parameters:
json- the JSON text; must not be null- Returns:
- the parsed value
- Throws:
JsonValues.JsonParseException- ifjsonis not well-formed, or has trailing content
-