Class JsonDataItemResponseParser
- java.lang.Object
-
- com.cognite.client.servicesV1.response.DefaultResponseParser
-
- com.cognite.client.servicesV1.response.JsonDataItemResponseParser
-
- All Implemented Interfaces:
ResponseParser<String>,Serializable
public abstract class JsonDataItemResponseParser extends DefaultResponseParser
Extracts results items from a json payload corresponding to the api v0.6 specification.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonDataItemResponseParser.Builder
-
Field Summary
-
Fields inherited from class com.cognite.client.servicesV1.response.DefaultResponseParser
instanceId, LOG, MAX_LENGTH_JSON_LOG, objectMapper
-
-
Constructor Summary
Constructors Constructor Description JsonDataItemResponseParser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JsonDataItemResponseParser.Builderbuilder()com.google.common.collect.ImmutableList<String>extractItems(String json)Extract the main items from a results json payload corresponding to v0.6 spec.Optional<String>extractNextCursor(String json)Extract the next cursor from a results json payload.abstract JsonDataItemResponseParser.BuildertoBuilder()-
Methods inherited from class com.cognite.client.servicesV1.response.DefaultResponseParser
extractItems, extractNextCursor, parseToString
-
-
-
-
Method Detail
-
builder
public static JsonDataItemResponseParser.Builder builder()
-
toBuilder
public abstract JsonDataItemResponseParser.Builder toBuilder()
-
extractNextCursor
public Optional<String> extractNextCursor(String json) throws IOException
Extract the next cursor from a results json payload.- Overrides:
extractNextCursorin classDefaultResponseParser- Parameters:
json- The results json payload- Returns:
- Throws:
IOException
-
extractItems
public com.google.common.collect.ImmutableList<String> extractItems(String json) throws Exception
Extract the main items from a results json payload corresponding to v0.6 spec.- Overrides:
extractItemsin classDefaultResponseParser- Parameters:
json- The results json payload- Returns:
- Throws:
IOExceptionIOExceptionException
-
-