JsonSetter (Jackson-annotations 2.1.0 API)
Date: 2012-10-05

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## com.fasterxml.jackson.annotation
Annotation Type JsonSetter

    @Target(value={ANNOTATION_TYPE,METHOD})
    @Retention(value=RUNTIME)
    public @interface JsonSetter

Marker annotation that can be used to define a non-static, single-argument method to be used as a "setter" for a logical property as an alternative to recommended `JsonProperty` annotation (which was introduced in version 1.1).

Setter means that when a property with matching name is encountered in JSON content, this method will be used to set value of the property.

NOTE: this annotation was briefly deprecated for version 1.5; but has since been un-deprecated to both allow for asymmetric naming (possibly different name when reading and writing JSON), and more importantly to allow multi-argument setter method in future.

Optional Element Summary
`String` | `value` Optional default argument that defines logical property this method is used to modify ("set"); this is the property name used in JSON content.

### value

    public abstract String value

  Optional default argument that defines logical property this method is used to modify ("set"); this is the property name used in JSON content.

  Default:
    ""

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2012 FasterXML. All Rights Reserved.