From 7e30b06349586381fe72e0fecf6c238e04ce9e5a Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Tue, 29 Dec 2015 20:19:58 -0800 Subject: [PATCH] Fix #1062 --- release-notes/VERSION | 1 + .../databind/jsonFormatVisitors/JsonFormatTypes.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/release-notes/VERSION b/release-notes/VERSION index 2b5d28dd8f..b6429f4cc2 100644 --- a/release-notes/VERSION +++ b/release-notes/VERSION @@ -56,6 +56,7 @@ Project: jackson-databind (reported by fabiolaa@github) #1044: Add `AnnotationIntrospector.resolveSetterConflict(...)` to allow custom setter conflict resolution (suggested by clydebarrow@github) +#1062: Add new `JsonFormatTypes` enumerated value, `UNION` - Make `JsonValueFormat` (self-)serializable, deserializable, to/from valid external value (as per JSON Schema spec) diff --git a/src/main/java/com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatTypes.java b/src/main/java/com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatTypes.java index f1d4cb21af..538354a0df 100644 --- a/src/main/java/com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatTypes.java +++ b/src/main/java/com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatTypes.java @@ -14,6 +14,14 @@ public enum JsonFormatTypes OBJECT, ARRAY, NULL, + + /** + * Virtual type used for union types; needed to make JSON Schema work with union types. + * + * @since 2.7 + */ + UNION, + ANY; private static final Map _byLCName = new HashMap();