Class BasicNodeReader

java.lang.Object
com.networknt.schema.serialization.BasicNodeReader
All Implemented Interfaces:
NodeReader

public class BasicNodeReader extends Object implements NodeReader
Basic implementation of NodeReader.
  • Constructor Details

    • BasicNodeReader

      protected BasicNodeReader()
  • Method Details

    • getInstance

      public static BasicNodeReader getInstance()
    • readTree

      public com.fasterxml.jackson.databind.JsonNode readTree(String content, InputFormat inputFormat) throws IOException
      Description copied from interface: NodeReader
      Deserialize content as a tree.
      Specified by:
      readTree in interface NodeReader
      Parameters:
      content - the content
      inputFormat - the input format
      Returns:
      the node
      Throws:
      IOException - IOException
    • readTree

      public com.fasterxml.jackson.databind.JsonNode readTree(InputStream content, InputFormat inputFormat) throws IOException
      Description copied from interface: NodeReader
      Deserialize content as a tree.
      Specified by:
      readTree in interface NodeReader
      Parameters:
      content - input stream
      inputFormat - input format
      Returns:
      the node
      Throws:
      IOException - IOException
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper(InputFormat inputFormat)
      Gets the object mapper for the input format.
      Parameters:
      inputFormat - the input format
      Returns:
      the object mapper