public class JacksonUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
java.util.function.Consumer<? super JsonError> jsonErrorConsumer)
Perform a default configuration of the given object mapper for
parsing glTF data
|
static com.fasterxml.jackson.databind.ObjectMapper |
createObjectMapper()
Create a default Jackson object mapper for this class
|
static com.fasterxml.jackson.databind.ObjectMapper |
createObjectMapper(java.util.function.Consumer<? super JsonError> jsonErrorConsumer)
Create a default Jackson object mapper for this class
|
static java.util.function.Consumer<JsonError> |
loggingJsonErrorConsumer()
Returns a consumer for
JsonErrors that prints logging
messages for the errors. |
static com.fasterxml.jackson.databind.JsonNode |
readJson(java.nio.ByteBuffer jsonData)
Read a Jackson JSON node from the given JSON data
|
public static java.util.function.Consumer<JsonError> loggingJsonErrorConsumer()
JsonErrors that prints logging
messages for the errors.public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(java.util.function.Consumer<? super JsonError> jsonErrorConsumer)
jsonErrorConsumer - The consumer for JsonErrors. If this
is null, then the errors will not be handled.public static void configure(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
java.util.function.Consumer<? super JsonError> jsonErrorConsumer)
objectMapper - The object mapperjsonErrorConsumer - The consumer for JsonErrors. If this
is null, then the errors will not be handled.public static com.fasterxml.jackson.databind.JsonNode readJson(java.nio.ByteBuffer jsonData)
throws java.io.IOException
jsonData - The JSON datajava.io.IOException - If an IO error occursCopyright © 2022. All Rights Reserved.