Class JsonWriterSupport

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getIndent()  
      protected java.lang.String getLineSeparator()  
      protected void init​(java.io.Writer out, JsonParserConfiguration config)
      Initializes this object.
      protected boolean isPretty()  
      protected void write​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Writes a Map in JSON object format.
      protected void writeArray​(java.lang.Iterable<java.lang.Object> iterable)
      Writes an Iterable in JSON array format.
      protected void writeString​(java.lang.String text)
      Writes a String in JSON string format.
      protected void writeValue​(java.lang.Object value)
      Writes a value in JSON format.
      • Methods inherited from class java.lang.Object

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

      • write

        protected void write​(java.util.Map<java.lang.String,​java.lang.Object> map)
                      throws java.io.IOException
        Writes a Map in JSON object format.
        Parameters:
        map - the Map to write
        Throws:
        java.io.IOException
      • writeValue

        protected void writeValue​(java.lang.Object value)
                           throws java.io.IOException
        Writes a value in JSON format. The value must be a String, Number, Boolean, Map or Iterable (array), or else Object.toString() is called and the value is formatted as a JSON string.
        Parameters:
        value - the Object to write
        Throws:
        java.io.IOException
      • writeString

        protected void writeString​(java.lang.String text)
                            throws java.io.IOException
        Writes a String in JSON string format.
        Parameters:
        text - the String to write
        Throws:
        java.io.IOException
      • writeArray

        protected void writeArray​(java.lang.Iterable<java.lang.Object> iterable)
                           throws java.io.IOException
        Writes an Iterable in JSON array format.
        Parameters:
        iterable - the Iterable to write
        Throws:
        java.io.IOException
      • isPretty

        protected boolean isPretty()
      • getIndent

        protected int getIndent()
      • getLineSeparator

        protected java.lang.String getLineSeparator()