public interface JsonConvertibleRecord
Modifier and Type | Method and Description |
---|---|
java.lang.String |
dumpJSON()
Get the record in Json string format.
|
void |
fromJSON(com.fasterxml.jackson.core.JsonParser jParser)
Deserializes an instance of the implementing class from JSON using the
JsonParser provided.
|
java.util.function.Predicate<com.fasterxml.jackson.core.JsonGenerator> |
getJsonGenerator(java.lang.String field)
Get the JsonGenerator for a field.
|
java.util.function.Predicate<com.fasterxml.jackson.core.JsonParser> |
getJsonParser(java.lang.String field)
Get the JsonParser for a field.
|
void |
setJsonField(java.lang.String field,
MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonGenerator,java.io.IOException> output,
MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonParser,java.io.IOException> input) |
void |
setShowWarnings(boolean showWarnings) |
void |
toJSON(com.fasterxml.jackson.core.JsonGenerator jGenerator)
Serializes the implementing class to JSON using the JsonGenerator provided.
|
void toJSON(com.fasterxml.jackson.core.JsonGenerator jGenerator) throws java.io.IOException
jGenerator
- JsonGenerator stream to read Json from.java.io.IOException
- Thrown if unable to write to JsonGenerator.void fromJSON(com.fasterxml.jackson.core.JsonParser jParser) throws java.io.IOException
jParser
- JsonParser stream to write Json to.java.io.IOException
- Thrown if unable to read from JsonParser.void setShowWarnings(boolean showWarnings)
void setJsonField(java.lang.String field, MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonGenerator,java.io.IOException> output, MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonParser,java.io.IOException> input)
java.util.function.Predicate<com.fasterxml.jackson.core.JsonGenerator> getJsonGenerator(java.lang.String field)
field
- Json field.java.util.function.Predicate<com.fasterxml.jackson.core.JsonParser> getJsonParser(java.lang.String field)
field
- Json field.java.lang.String dumpJSON()