Implement #49
diff --git a/release-notes/VERSION b/release-notes/VERSION
index 8d193ef..623d53a 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -15,6 +15,7 @@
#47: Add `@JsonCreator.mode` property to explicitly choose between delegating- and property-based creators
#48: Allow `@JsonView` for (method) parameters too
+#49: Add `@JsonTypeInfo.skipWritingDefault`
- Added `@JsonInclude.content` to allow specifying inclusion criteria
for `java.util.Map` entries separate from inclusion of `Map` values
themselves
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
index 9da5bea..f0aa72a 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
@@ -250,10 +250,8 @@
* <li><code>com.fasterxml.jackson.databind.annotation.NoClass</code> means that
* objects with unmappable (or missing) type are to be mapped to null references.
* </ul>
- *
- * TODO: In 2.5, change default to {@link java.lang.Void}
*/
- public Class<?> defaultImpl() default None.class;
+ public Class<?> defaultImpl() default Void.class;
/**
* Property that defines whether type identifier value will be passed
@@ -268,6 +266,14 @@
* @since 2.0
*/
public boolean visible() default false;
+
+ /**
+ * Property that defines whether type serializer is allowed to omit writing
+ * of type id, in case that value written has type same as {@link #defaultImpl()}.
+ * If true, omission is allowed (although writer may or may not be able to do that);
+ * if false, type id should always be written still.
+ */
+ public boolean skipWritingDefault() default false;
/*
/**********************************************************