Class JsonRawRowResponseParser
- java.lang.Object
-
- com.cognite.client.servicesV1.response.DefaultResponseParser
-
- com.cognite.client.servicesV1.response.JsonRawRowResponseParser
-
- All Implemented Interfaces:
ResponseParser<String>,Serializable
public abstract class JsonRawRowResponseParser extends DefaultResponseParser
Parses responses containing one or more raw rows. This class contains logic to detect if the items are wrapped in an items array or if a single item is placed at the root. In the case of querying for a single row (by id/row key), only a single item is returned at the json root.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonRawRowResponseParser.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 JsonRawRowResponseParser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JsonRawRowResponseParser.Builderbuilder()com.google.common.collect.ImmutableList<String>extractItems(String json)Extract the main items from a results json payload corresponding to v0.6 spec.abstract JsonRawRowResponseParser.BuildertoBuilder()-
Methods inherited from class com.cognite.client.servicesV1.response.DefaultResponseParser
extractItems, extractNextCursor, extractNextCursor, parseToString
-
-
-
-
Method Detail
-
builder
public static JsonRawRowResponseParser.Builder builder()
-
toBuilder
public abstract JsonRawRowResponseParser.Builder toBuilder()
-
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
-
-