public class JsonApiMapper extends Object
Constructor and Description |
---|
JsonApiMapper()
Instantiates a new Json Api Mapper.
|
JsonApiMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Instantiates a new Json Api Mapper.
|
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Gets object OBJECT_MAPPER.
|
JsonApiDocument |
readJsonApiDocument(com.fasterxml.jackson.databind.JsonNode node)
Read json api document.
|
JsonApiDocument |
readJsonApiDocument(String doc)
Read json api document.
|
List<Patch> |
readJsonApiPatchExtDoc(String doc)
Read json api patch ext doc.
|
JsonApiDocument |
readJsonApiPatchExtValue(com.fasterxml.jackson.databind.JsonNode value)
Read json api patch ext value.
|
com.fasterxml.jackson.databind.JsonNode |
toJsonObject(JsonApiDocument jsonApiDocument)
To json object.
|
String |
writeJsonApiDocument(JsonApiDocument jsonApiDocument)
Write out JSON API Document as a string.
|
String |
writeJsonApiDocument(com.fasterxml.jackson.databind.JsonNode node)
Write json api document.
|
public JsonApiMapper()
public JsonApiMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
mapper
- Custom object mapper to use internally for serializing/deserializingpublic String writeJsonApiDocument(JsonApiDocument jsonApiDocument) throws com.fasterxml.jackson.core.JsonProcessingException
jsonApiDocument
- the json api documentcom.fasterxml.jackson.core.JsonProcessingException
- the json processing exceptionpublic com.fasterxml.jackson.databind.JsonNode toJsonObject(JsonApiDocument jsonApiDocument)
jsonApiDocument
- the json api documentpublic String writeJsonApiDocument(com.fasterxml.jackson.databind.JsonNode node) throws com.fasterxml.jackson.core.JsonProcessingException
node
- the nodecom.fasterxml.jackson.core.JsonProcessingException
- the json processing exceptionpublic JsonApiDocument readJsonApiDocument(String doc) throws IOException
doc
- the docIOException
- the iO exceptionpublic JsonApiDocument readJsonApiDocument(com.fasterxml.jackson.databind.JsonNode node) throws IOException
node
- the nodeIOException
- the iO exceptionpublic JsonApiDocument readJsonApiPatchExtValue(com.fasterxml.jackson.databind.JsonNode value) throws com.fasterxml.jackson.core.JsonProcessingException
value
- the valuecom.fasterxml.jackson.core.JsonProcessingException
- the json processing exceptionpublic List<Patch> readJsonApiPatchExtDoc(String doc) throws IOException
doc
- the docIOException
- the iO exceptionpublic com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Copyright © 2015–2021 Yahoo! Inc.. All rights reserved.