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 extendsJackson2Supportyou 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.
Jackson2ModuleForIBeansneeds to be registered in the used JacksonObjectMapper. SeeJackson2ModuleForIBeansfor 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 voidreadFromJsonParser(JsonParser p, DeserializationContext ctxt)Reads the field values from aJsonParserand 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 aJsonParserand sets the fields of this IBean to the retrieved values.You normally do not use this method directly. It is mainly called from
Jackson2ModuleForIBeansduring JSON deserialization.- Parameters:
p- theJsonParserreading some JSON representation of this IBeanctxt- the Jackson2 deserialization context
-
-