Package com.google.api.client.json
Annotation Type JsonString
-
@Target(FIELD) @Retention(RUNTIME) public @interface JsonStringUse this annotation to specify that a declared numeric Java field should map to a JSON string.By default declared Java numeric fields are stored as JSON numbers. For example:
can be used for this JSON content:class A { @Key BigInteger value; }
However, if instead the JSON content uses a JSON String to store the value, one needs to use the{"value" : 12345768901234576890123457689012345768901234576890}JsonStringannotation. For example:
can be used for this JSON content:class B { @Key @JsonString BigInteger value; }{"value" : "12345768901234576890123457689012345768901234576890"}- Since:
- 1.3