public class JsonSchemaIdResolver
extends com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
JsonSchema instances.
Note that to support custom types, you will need to sub-class this resolver
and override at least idFromValue(Object), idFromValueAndType(Object, Class) and
typeFromId(com.fasterxml.jackson.databind.DatabindContext, java.lang.String) methods; as well as associate this resolver using
JsonTypeInfo annotation on
all custom JsonSchema implementation classes.| Constructor and Description |
|---|
JsonSchemaIdResolver() |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.annotation.JsonTypeInfo.Id |
getMechanism() |
String |
idFromBaseType() |
String |
idFromValue(Object value) |
String |
idFromValueAndType(Object value,
Class<?> suggestedType) |
void |
init(com.fasterxml.jackson.databind.JavaType baseType) |
com.fasterxml.jackson.databind.JavaType |
typeFromId(com.fasterxml.jackson.databind.DatabindContext ctxt,
String id) |
public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext ctxt,
String id)
typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolvertypeFromId in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBasepublic com.fasterxml.jackson.annotation.JsonTypeInfo.Id getMechanism()
public void init(com.fasterxml.jackson.databind.JavaType baseType)
init in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolverinit in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBasepublic String idFromBaseType()
idFromBaseType in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolveridFromBaseType in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBaseCopyright © 2017 FasterXML. All rights reserved.