public class JsonSerializationContext extends JsonMappingContext
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonSerializationContext.Builder
Builder for
JsonSerializationContext. |
static class |
JsonSerializationContext.DefaultBuilder |
| Modifier and Type | Method and Description |
|---|---|
void |
addGenerator(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator)
Used by generated
AbstractBeanJsonSerializer |
void |
addObjectId(Object object,
ObjectIdSerializer<?> id) |
static JsonSerializationContext.Builder |
builder() |
<T> com.fasterxml.jackson.annotation.ObjectIdGenerator<T> |
findObjectIdGenerator(com.fasterxml.jackson.annotation.ObjectIdGenerator<T> gen)
Used by generated
AbstractBeanJsonSerializer |
Logger |
getLogger() |
ObjectIdSerializer<?> |
getObjectId(Object object) |
boolean |
isOrderMapEntriesByKeys() |
boolean |
isSerializeNulls() |
boolean |
isWrapRootValue() |
boolean |
isWriteCharArraysAsJsonArrays() |
boolean |
isWriteDateKeysAsTimestamps() |
boolean |
isWriteDatesAsTimestamps() |
boolean |
isWriteEmptyJsonArrays() |
boolean |
isWriteNullMapValues() |
boolean |
isWriteSingleElemArraysUnwrapped() |
JsonWriter |
newJsonWriter() |
RuntimeException |
traceError(Object value,
RuntimeException cause)
Trace an error and returns a corresponding exception.
|
RuntimeException |
traceError(Object value,
RuntimeException cause,
JsonWriter writer)
Trace an error with current writer state and returns a corresponding exception.
|
JsonSerializationException |
traceError(Object value,
String message)
Trace an error and returns a corresponding exception.
|
JsonSerializationException |
traceError(Object value,
String message,
JsonWriter writer)
Trace an error with current writer state and returns a corresponding exception.
|
public static JsonSerializationContext.Builder builder()
public Logger getLogger()
getLogger in class JsonMappingContextpublic boolean isSerializeNulls()
public boolean isWriteDatesAsTimestamps()
public boolean isWriteDateKeysAsTimestamps()
public boolean isWrapRootValue()
public boolean isWriteCharArraysAsJsonArrays()
public boolean isWriteNullMapValues()
public boolean isWriteEmptyJsonArrays()
public boolean isOrderMapEntriesByKeys()
public boolean isWriteSingleElemArraysUnwrapped()
public JsonWriter newJsonWriter()
public JsonSerializationException traceError(Object value, String message)
value - current valuemessage - error messageJsonSerializationException with the given messagepublic JsonSerializationException traceError(Object value, String message, JsonWriter writer)
value - current valuemessage - error messagewriter - current writerJsonSerializationException with the given messagepublic RuntimeException traceError(Object value, RuntimeException cause)
value - current valuecause - cause of the errorJsonSerializationException if we wrap the exceptions, the cause otherwisepublic RuntimeException traceError(Object value, RuntimeException cause, JsonWriter writer)
value - current valuecause - cause of the errorwriter - current writerJsonSerializationException if we wrap the exceptions, the cause otherwisepublic void addObjectId(Object object, ObjectIdSerializer<?> id)
public ObjectIdSerializer<?> getObjectId(Object object)
public void addGenerator(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator)
AbstractBeanJsonSerializergenerator - instance of generator to addpublic <T> com.fasterxml.jackson.annotation.ObjectIdGenerator<T> findObjectIdGenerator(com.fasterxml.jackson.annotation.ObjectIdGenerator<T> gen)
AbstractBeanJsonSerializergen - generator used to find equivalent generatorCopyright © 2016. All Rights Reserved.