public final class JsonValueBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.forgerock.json.JsonValue |
fromResource(Class<?> relativeType,
String resource)
Construct a
JsonValue from a classpath resource. |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Get singleton ObjectMapper instance for serialising to/from JSON.
|
static JsonObject |
jsonValue()
Creates a Builder object for creating JsonValue objects.
|
static org.forgerock.json.JsonValue |
toJsonArray(InputStream json)
Converts the passed input stream into a
JsonValue represented as a list. |
static org.forgerock.json.JsonValue |
toJsonArray(String json)
Converts the passed json string into a
JsonValue represented as a list. |
static org.forgerock.json.JsonValue |
toJsonValue(byte[] json)
Converts a byte array into a JsonValue.
|
static org.forgerock.json.JsonValue |
toJsonValue(String json)
Converts a String into a JsonValue.
|
public static JsonObject jsonValue()
public static org.forgerock.json.JsonValue toJsonValue(String json) throws org.forgerock.json.JsonException
json - The json String.org.forgerock.json.JsonException - If there is a problem parsing the json String.public static org.forgerock.json.JsonValue toJsonValue(byte[] json)
throws org.forgerock.json.JsonException
json - json represented in bytesorg.forgerock.json.JsonException - If there is a problem parsing the json byte array.public static org.forgerock.json.JsonValue toJsonArray(String json) throws org.forgerock.json.JsonException
JsonValue represented as a list.json - the json stringorg.forgerock.json.JsonException - should an error occur whilst parsing the jsonpublic static org.forgerock.json.JsonValue toJsonArray(InputStream json) throws org.forgerock.json.JsonException
JsonValue represented as a list.json - an input streamorg.forgerock.json.JsonException - should an error occur whilst parsing the jsonpublic static org.forgerock.json.JsonValue fromResource(Class<?> relativeType, String resource)
JsonValue from a classpath resource.relativeType - The type to resolve the resource from.resource - The resource path.public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.