There was an error while loading. Please reload this page.
Marks a getter/setter or a property for serialization/de-serialization. This must appear for every property you expect to be serialized/de-serialized.
Note that getters and setters must both be annotated if you expect marshalling to work in both directions.
<? class Baz { /** * @JsonProperty(name="foo", type="integer") */ public $foo; /** * Name will default to bar. * @JsonProperty(type="string") */ public function getBar() { ... } /** * Slightly contrived. * @JsonProperty(name="bar", type="string") */ public function setBaz($baz) { ... }
Back to Annotations list