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 Details

    • DataMapperService

      public DataMapperService()
  • Method Details

    • 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
    • convertValue

      public <T> T convertValue(Object fromValue, Class<T> toValueType)
    • writeValueAsString

      public String writeValueAsString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • readValueString

      public <T> T readValueString(String content, Class<T> clazz) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException