Class JsonWriter


  • public class JsonWriter
    extends JsonBase
    Converts data to JSON.
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonWriter​(java.util.Map<java.lang.String,​java.lang.String> keywordMapInput)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode buildJsonNode​(java.util.Collection<java.util.Map<java.lang.String,​java.lang.Object>> flatDataRecords)
      Builds a JSON node from a list of key-value pairs.
      java.lang.String buildJsonString​(java.util.Collection<java.util.Map<java.lang.String,​java.lang.Object>> flatDataRecords)
      Builds a JSON string from a list of key-value pairs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonWriter

        public JsonWriter​(java.util.Map<java.lang.String,​java.lang.String> keywordMapInput)
        Constructs a new instance.
        Parameters:
        keywordMapInput - the keyword map
    • Method Detail

      • buildJsonString

        public java.lang.String buildJsonString​(java.util.Collection<java.util.Map<java.lang.String,​java.lang.Object>> flatDataRecords)
                                         throws com.fasterxml.jackson.core.JsonProcessingException
        Builds a JSON string from a list of key-value pairs.
        Parameters:
        flatDataRecords - the key-value pairs
        Returns:
        a string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - when a key-value pair cannot be encoded
      • buildJsonNode

        public com.fasterxml.jackson.databind.JsonNode buildJsonNode​(java.util.Collection<java.util.Map<java.lang.String,​java.lang.Object>> flatDataRecords)
                                                              throws com.fasterxml.jackson.core.JsonProcessingException
        Builds a JSON node from a list of key-value pairs.
        Parameters:
        flatDataRecords - the key-value pairs
        Returns:
        a JSON node
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - when a key-value pair cannot be encoded