Package com.backblaze.b2.json
Annotation Type B2Json.serializedName
-
@Retention(RUNTIME) @Target(FIELD) public static @interface B2Json.serializedName
Annotation to declare that this member will be serialized to JSON with the specified name, instead of the field name in the Java class.The Java class's field name is used for the params list in the B2Json.constructor annotation
For example:
class Example { @B2Json.serializedName(value = "@field") private String field; @B2Json.constructor(params = "field") public Example(String field) { this.field = field; } }
will serialize to the following JSON:{ "@field": "value" }
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
-