public final class JsonParser
extends java.lang.Object
Object json =JsonParser.any().from("{\"a\":[true,false], \"b\":1}"); Number json = (Number)JsonParser.any().from("123.456e7"); JsonObject json =JsonParser.object().from("{\"a\":[true,false], \"b\":1}"); JsonArray json =JsonParser.array().from("[1, {\"a\":[true,false], \"b\":1}]");
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonParser.JsonParserContext<T>
Returns a type-safe parser context for a
JsonObject, JsonArray or "any" type from which you can
parse a String or a Reader. |
| Modifier and Type | Method and Description |
|---|---|
static JsonParser.JsonParserContext<java.lang.Object> |
any() |
static JsonParser.JsonParserContext<JsonArray> |
array() |
static JsonParser.JsonParserContext<JsonObject> |
object() |
public static JsonParser.JsonParserContext<JsonObject> object()
public static JsonParser.JsonParserContext<JsonArray> array()
public static JsonParser.JsonParserContext<java.lang.Object> any()