public interface CustomFieldInterface
AbstractResponse so they are immediately available to all interfaces.| Modifier and Type | Method and Description |
|---|---|
default Object |
get(String field)
Gets a field as a raw object.
|
default com.google.gson.JsonArray |
getAsArray(String field)
Tries to deserialise and return the given JSON field as an Array.
|
default Boolean |
getAsBoolean(String field)
Tries to deserialise and return the given JSON field as a Boolean.
|
default Double |
getAsDouble(String field)
Tries to deserialise and return the given JSON field as a Double.
|
default Integer |
getAsInteger(String field)
Tries to deserialise and return the given JSON field as an Integer.
|
default String |
getAsString(String field)
Tries to deserialise and return the given JSON field as a String.
|
default Object get(String field)
field - The name of the field.default String getAsString(String field) throws SchemaViolationError
JsonElement, which is the case for custom simple fields.field - The name of the field.SchemaViolationError - If the field cannot be converted to a String.default Integer getAsInteger(String field) throws SchemaViolationError
JsonElement, which is the case for custom simple fields.field - The name of the field.SchemaViolationError - If the field cannot be converted to an Integer.default Double getAsDouble(String field) throws SchemaViolationError
JsonElement, which is the case for custom simple fields.field - The name of the field.SchemaViolationError - If the field cannot be converted to a Double.default Boolean getAsBoolean(String field) throws SchemaViolationError
JsonElement, which is the case for custom simple fields.field - The name of the field.SchemaViolationError - If the field cannot be converted to a Boolean.default com.google.gson.JsonArray getAsArray(String field) throws SchemaViolationError
JsonElement, which is the case for custom simple fields.field - The name of the field.SchemaViolationError - If the field cannot be converted to an Array.Copyright © 2022 Adobe. All rights reserved.