Class ODataResponseDeserializer
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.ODataResponseDeserializer
Implementation to deserialize OData responses based on a given
ODataProtocol
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.vavr.control.Option<com.google.gson.JsonArray>
getElementToResultPrimitiveSet
(com.google.gson.JsonElement element) Get the element to the response result set.io.vavr.control.Option<com.google.gson.JsonPrimitive>
getElementToResultPrimitiveSingle
(com.google.gson.JsonElement element) Get the element to the single response result item.io.vavr.control.Option<com.google.gson.JsonArray>
getElementToResultSet
(com.google.gson.JsonElement element) Get the element to the response result set.io.vavr.control.Option<com.google.gson.JsonObject>
getElementToResultSingle
(com.google.gson.JsonElement element) Get the element to the single response result item.void
positionReaderToResultSet
(com.google.gson.stream.JsonReader reader) Position the to the response result set.
-
Constructor Details
-
ODataResponseDeserializer
-
-
Method Details
-
positionReaderToResultSet
public void positionReaderToResultSet(@Nonnull com.google.gson.stream.JsonReader reader) throws IOException Position the to the response result set.- Parameters:
reader
- The internal JsonReader instance.- Throws:
IOException
- If response cannot be read.
-
getElementToResultSet
@Nonnull public io.vavr.control.Option<com.google.gson.JsonArray> getElementToResultSet(@Nonnull com.google.gson.JsonElement element) Get the element to the response result set.- Parameters:
element
- The root element.- Returns:
- The optional result as JsonArray.
-
getElementToResultSingle
@Nonnull public io.vavr.control.Option<com.google.gson.JsonObject> getElementToResultSingle(@Nonnull com.google.gson.JsonElement element) Get the element to the single response result item.- Parameters:
element
- The root element.- Returns:
- The optional result as JsonObject.
-
getElementToResultPrimitiveSet
@Nonnull public io.vavr.control.Option<com.google.gson.JsonArray> getElementToResultPrimitiveSet(@Nonnull com.google.gson.JsonElement element) Get the element to the response result set.- Parameters:
element
- The root element.- Returns:
- The optional result as JsonArray.
-
getElementToResultPrimitiveSingle
@Nonnull public io.vavr.control.Option<com.google.gson.JsonPrimitive> getElementToResultPrimitiveSingle(@Nonnull com.google.gson.JsonElement element) Get the element to the single response result item.- Parameters:
element
- The root element.- Returns:
- The optional result as JsonPrimitive.
-