Skip to content

Commit

Permalink
Fix #109
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 22, 2016
1 parent 98f2f31 commit ae3a8d3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
11 changes: 11 additions & 0 deletions src/main/java/com/fasterxml/jackson/annotation/JsonAnyGetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
@JacksonAnnotation
public @interface JsonAnyGetter
{
/**
* Optional argument that defines whether this annotation is active
* or not. The only use for value 'false' if for overriding purposes.
* Overriding may be necessary when used
* with "mix-in annotations" (aka "annotation overrides").
* For most cases, however, default value of "true" is just fine
* and should be omitted.
*
* @since 2.9
*/
boolean enabled() default true;
}
19 changes: 16 additions & 3 deletions src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,33 @@
import java.lang.annotation.Target;

/**
* Marker annotation that can be used to define a non-static,
* Marker annotation that can be used to define a logical "any setter" mutator --
* either using non-static
* two-argument method (first argument name of property, second value
* to set), to be used as a "fallback" handler
* to set) or a field (of type {@link java.util.Map} or POJO) -
* to be used as a "fallback" handler
* for all otherwise unrecognized properties found from JSON content.
* It is similar to {@link javax.xml.bind.annotation.XmlAnyElement}
* in behavior; and can only be used to denote a single property
* per type.
*<p>
* If used, all otherwise unmapped key-value pairs from JSON Object values
* are added to the property (of type Map or bean).
* are added using mutator.
*/
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotation
public @interface JsonAnySetter
{
/**
* Optional argument that defines whether this annotation is active
* or not. The only use for value 'false' if for overriding purposes.
* Overriding may be necessary when used
* with "mix-in annotations" (aka "annotation overrides").
* For most cases, however, default value of "true" is just fine
* and should be omitted.
*
* @since 2.9
*/
boolean enabled() default true;
}

0 comments on commit ae3a8d3

Please sign in to comment.