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.TypeIdResolver
typeFromId
in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
public com.fasterxml.jackson.annotation.JsonTypeInfo.Id getMechanism()
public void init(com.fasterxml.jackson.databind.JavaType baseType)
init
in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
init
in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
public String idFromBaseType()
idFromBaseType
in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
idFromBaseType
in class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
Copyright © 2017 FasterXML. All rights reserved.