Package org.coliper.ibean.extension
Interface Jackson2Support
-
- All Superinterfaces:
JsonSerializable
public interface Jackson2Support extends JsonSerializable
Extension interface that makes IBeans serializable and deserializable with Jackson2. If an IBean interface extendsJackson2Support
you are able to convert any IBean instance from and to JSON. For this to work you need another two prerequisites:- jackson-core and jackson-databind with version 2.6 or higher need to be in the classpath.
Jackson2ModuleForIBeans
needs to be registered in the used JacksonObjectMapper
. SeeJackson2ModuleForIBeans
for details.
- See Also:
ObjectMapper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable
JsonSerializable.Base
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
readFromJsonParser(JsonParser p, DeserializationContext ctxt)
Reads the field values from aJsonParser
and sets the fields of this IBean to the retrieved values.-
Methods inherited from interface com.fasterxml.jackson.databind.JsonSerializable
serialize, serializeWithType
-
-
-
-
Method Detail
-
readFromJsonParser
void readFromJsonParser(JsonParser p, DeserializationContext ctxt)
Reads the field values from aJsonParser
and sets the fields of this IBean to the retrieved values.You normally do not use this method directly. It is mainly called from
Jackson2ModuleForIBeans
during JSON deserialization.- Parameters:
p
- theJsonParser
reading some JSON representation of this IBeanctxt
- the Jackson2 deserialization context
-
-