Package org.noggit

Class JSONWriter


  • public class JSONWriter
    extends Object
    • Field Detail

      • level

        protected int level
      • indent

        protected int indent
    • Constructor Detail

      • JSONWriter

        public JSONWriter​(CharArr out,
                          int indentSize)
        Parameters:
        out - the CharArr to write the output to.
        indentSize - The number of space characters to use as an indent (default 2). 0=newlines but no spaces, -1=no indent at all.
      • JSONWriter

        public JSONWriter​(CharArr out)
    • Method Detail

      • setIndentSize

        public void setIndentSize​(int indentSize)
      • indent

        public void indent()
      • write

        public void write​(Object o)
      • handleUnknownClass

        public void handleUnknownClass​(Object o)
        Override this method for custom handling of unknown classes. Also see the Writable interface.
      • write

        public void write​(Map<?,​?> val)
      • write

        public void write​(Collection<?> val)
      • write

        public void write​(byte[] val)
        A byte[] may be either a single logical value, or a list of small integers. It's up to the implementation to decide.
      • write

        public void write​(short[] val)
      • write

        public void write​(int[] val)
      • write

        public void write​(long[] val)
      • write

        public void write​(float[] val)
      • write

        public void write​(double[] val)
      • write

        public void write​(boolean[] val)
      • write

        public void write​(short number)
      • write

        public void write​(byte number)
      • writeNull

        public void writeNull()
      • writeString

        public void writeString​(String str)
      • writeString

        public void writeString​(CharSequence str)
      • writeString

        public void writeString​(CharArr str)
      • writeStringStart

        public void writeStringStart()
      • writeStringChars

        public void writeStringChars​(CharArr partialStr)
      • writeStringEnd

        public void writeStringEnd()
      • write

        public void write​(long number)
      • write

        public void write​(int number)
      • write

        public void write​(double number)
      • write

        public void write​(float number)
      • write

        public void write​(boolean bool)
      • write

        public void write​(char[] val)
      • writeNumber

        public void writeNumber​(CharArr digits)
      • writePartialNumber

        public void writePartialNumber​(CharArr digits)
      • startObject

        public void startObject()
      • endObject

        public void endObject()
      • startArray

        public void startArray()
      • endArray

        public void endArray()
      • writeValueSeparator

        public void writeValueSeparator()
      • writeNameSeparator

        public void writeNameSeparator()