Package io.jans.fido2.service
Class DataMapperService
- java.lang.Object
-
- io.jans.fido2.service.DataMapperService
-
@ApplicationScoped public class DataMapperService extends Object
Conversions to/from JSON format and to/from CBOR format- Version:
- May 08, 2020
- Author:
- Yuriy Movchan
-
-
Constructor Summary
Constructors Constructor Description DataMapperService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.dataformat.cbor.CBORParsercborCreateParser(byte[] data)com.fasterxml.jackson.databind.JsonNodecborReadTree(byte[] content)byte[]cborWriteAsBytes(com.fasterxml.jackson.databind.JsonNode jsonNode)<T> TconvertValue(Object fromValue, Class<T> toValueType)com.fasterxml.jackson.databind.node.ArrayNodecreateArrayNode()com.fasterxml.jackson.databind.node.ObjectNodecreateObjectNode()voidinit()com.fasterxml.jackson.databind.JsonNodereadTree(byte[] content)com.fasterxml.jackson.databind.JsonNodereadTree(BufferedReader reader)com.fasterxml.jackson.databind.JsonNodereadTree(String content)<T> TreadValue(String content, Class<T> clazz)<T> TreadValueString(String content, Class<T> clazz)StringwriteValueAsString(Object value)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(byte[] content) throws IOException- Throws:
IOException
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(String content) throws IOException
- Throws:
IOException
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(BufferedReader reader) throws IOException
- Throws:
IOException
-
readValue
public <T> T readValue(String content, Class<T> clazz) throws IOException
- Throws:
IOException
-
createObjectNode
public com.fasterxml.jackson.databind.node.ObjectNode createObjectNode()
-
createArrayNode
public com.fasterxml.jackson.databind.node.ArrayNode createArrayNode()
-
cborReadTree
public com.fasterxml.jackson.databind.JsonNode cborReadTree(byte[] content) throws IOException- Throws:
IOException
-
cborWriteAsBytes
public byte[] cborWriteAsBytes(com.fasterxml.jackson.databind.JsonNode jsonNode) throws IOException- Throws:
IOException
-
cborCreateParser
public com.fasterxml.jackson.dataformat.cbor.CBORParser cborCreateParser(byte[] data) throws IOException- Throws:
IOException
-
writeValueAsString
public String writeValueAsString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-