public class AdaptativeJsonHandler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AdaptativeJsonHandler.JsonCodec |
Constructor and Description |
---|
AdaptativeJsonHandler(AdaptativeJsonHandler.JsonCodec codec) |
AdaptativeJsonHandler(byte[] source) |
AdaptativeJsonHandler(InputStream source) |
Modifier and Type | Method and Description |
---|---|
void |
changeHandler(AdaptativeJsonHandler.JsonCodec codec)
Change the JsonCodec: warning, change should be done before any usage to
preserve consistency
|
com.fasterxml.jackson.databind.node.ArrayNode |
createArrayNode() |
com.fasterxml.jackson.databind.node.ObjectNode |
createObjectNode() |
boolean |
exist(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?>... field) |
boolean |
exist(com.fasterxml.jackson.databind.node.ObjectNode node,
String... field) |
AdaptativeJsonHandler.JsonCodec |
getCodec() |
com.fasterxml.jackson.databind.node.ObjectNode |
getFromString(String value) |
Map<String,Object> |
getMapFromString(String value) |
String |
getString(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field) |
String |
getString(com.fasterxml.jackson.databind.node.ObjectNode node,
String field) |
Boolean |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
boolean defValue) |
byte[] |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
byte[] defValue) |
Double |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
double defValue) |
Integer |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
int defValue) |
Long |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
long defValue) |
String |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
String defValue) |
Boolean |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
boolean defValue) |
byte[] |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
byte[] defValue) |
Double |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
double defValue) |
Integer |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
int defValue) |
Long |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
long defValue) |
String |
getValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
String defValue) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
boolean value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
byte[] value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
double value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
int value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
long value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
Enum<?> field,
String value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
boolean value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
byte[] value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
double value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
int value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
long value) |
void |
setValue(com.fasterxml.jackson.databind.node.ObjectNode node,
String field,
String value) |
String |
writeAsString(Object object) |
public AdaptativeJsonHandler(AdaptativeJsonHandler.JsonCodec codec)
public AdaptativeJsonHandler(byte[] source) throws IOException
IOException
public AdaptativeJsonHandler(InputStream source) throws IOException
IOException
public void changeHandler(AdaptativeJsonHandler.JsonCodec codec)
codec
- public AdaptativeJsonHandler.JsonCodec getCodec()
public final com.fasterxml.jackson.databind.node.ObjectNode createObjectNode()
public final com.fasterxml.jackson.databind.node.ArrayNode createArrayNode()
public final com.fasterxml.jackson.databind.node.ObjectNode getFromString(String value)
value
- public final String writeAsString(Object object)
object
- public final String getString(com.fasterxml.jackson.databind.node.ObjectNode node, String field)
node
- field
- public final String getString(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field)
node
- field
- public final String getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, String defValue)
node
- field
- defValue
- public final Boolean getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, boolean defValue)
node
- field
- defValue
- public final Double getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, double defValue)
node
- field
- defValue
- public final Long getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, long defValue)
node
- field
- defValue
- public final Integer getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int defValue)
node
- field
- defValue
- public final byte[] getValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, byte[] defValue)
node
- field
- defValue
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, boolean value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, double value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, int value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, long value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, String value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, String field, byte[] value)
node
- field
- value
- public final boolean exist(com.fasterxml.jackson.databind.node.ObjectNode node, String... field)
node
- field
- public final String getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, String defValue)
node
- field
- defValue
- public final Boolean getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, boolean defValue)
node
- field
- defValue
- public final Double getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, double defValue)
node
- field
- defValue
- public final Long getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, long defValue)
node
- field
- defValue
- public final Integer getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, int defValue)
node
- field
- defValue
- public final byte[] getValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, byte[] defValue)
node
- field
- defValue
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, boolean value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, double value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, int value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, long value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, String value)
node
- field
- value
- public final void setValue(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?> field, byte[] value)
node
- field
- value
- public final boolean exist(com.fasterxml.jackson.databind.node.ObjectNode node, Enum<?>... field)
node
- field
- Copyright © 2009–2020 Waarp. All rights reserved.