forked from FasterXML/jackson-annotations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new
@JsonEnumDefaultValue
annotation.
See Jackson Databind PR FasterXML/jackson-databind#1126 for more details
- Loading branch information
Alejandro Rivera
committed
Feb 12, 2016
1 parent
5bfd012
commit c22a052
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/java/com/fasterxml/jackson/annotation/JsonEnumDefaultValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.fasterxml.jackson.annotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Marker annotation that can be used to define a default value | ||
* used when trying to deserialize unknown Enum values. | ||
* <p> | ||
* This annotation is only applicable when the <code>@READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE</code> | ||
* deserialization feature is enabled. | ||
* <p> | ||
* If the more than one enum value is marked with this annotation, | ||
* the first one to be detected will be used. Which one exactly is undetermined. | ||
*/ | ||
@Target(ElementType.FIELD) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@JacksonAnnotation | ||
public @interface JsonEnumDefaultValue | ||
{ | ||
|
||
} |