@Retention(value=RUNTIME) @Target(value=TYPE) public @interface AdditionalProperties
additionalProperties
, which is useful when working with key/value
JSON data structures.
For example, the following JSON Schema defines a map from string (key) to string (value),
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}
Note that keys are always strings in JSON, so the schema does not define that fact.
The annotation in this example would be used as follows,
@AdditionalProperties(String.class) private static class MyMap extends HashMap<String, String> {}
public abstract Class<?> value
Copyright © 2010-2018, ForgeRock All Rights Reserved.