Class JsonResponseParser
- java.lang.Object
-
- com.cognite.client.servicesV1.response.DefaultResponseParser
-
- com.cognite.client.servicesV1.response.JsonResponseParser
-
- All Implemented Interfaces:
ResponseParser<String>,Serializable
public abstract class JsonResponseParser extends DefaultResponseParser
Parses the complete json payload as a single item.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonResponseParser.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 JsonResponseParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonResponseParsercreate()com.google.common.collect.ImmutableList<String>extractItems(String json)Extract the main items from a results json payload.-
Methods inherited from class com.cognite.client.servicesV1.response.DefaultResponseParser
extractItems, extractNextCursor, extractNextCursor, parseToString
-
-
-
-
Method Detail
-
create
public static JsonResponseParser create()
-
extractItems
public com.google.common.collect.ImmutableList<String> extractItems(String json) throws Exception
Extract the main items from a results json payload. Returns the entire payload as a json string.- Overrides:
extractItemsin classDefaultResponseParser- Parameters:
json- The results json payload- Returns:
- Throws:
IOExceptionIOExceptionException
-
-