Class JSONCollection

    • Constructor Summary

      Constructors 
      Constructor Description
      JSONCollection()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void  writer)
      Prints the JSONObject to the writer using indentation (two spaces per indentation level).
      void  writer)
      Prints the JSONObject to the writer compactly (with no extra whitespace).
      void  writer, boolean compact)
      Prints the JSONObject to the write (compactly or not).
      toCompactString()
      Prints the JSONObject as a compact string (not extra punctuation).
      toString()
      Converts this JSON collection into a parsable string representation.
      toString​(boolean compact)
      Converts the JSONObject to a compact or pretty-print string representation
      • Methods inherited from class java.lang.

        , , , , , , , , ,
    • Method Detail

      • toString

        public  toString()
        Converts this JSON collection into a parsable string representation. Warning: This method assumes that the data structure is acyclical. Starting in release 5.2, the result will be pretty printed for readability.
        Overrides:
         in class 
        Returns:
        a printable, displayable, portable, transmittable representation of the object, beginning with { (left brace) and ending with } (right brace).
      • toString

        public  toString​(boolean compact)
        Converts the JSONObject to a compact or pretty-print string representation
        Parameters:
        compact - if true, return minimal format string.
        Since:
        5.2.0
      • toCompactString

        public  toCompactString()
        Prints the JSONObject as a compact string (not extra punctuation). This is, essentially, what Tapestry 5.1 did inside toString().
      • print

        public void  writer,
                          boolean compact)
        Prints the JSONObject to the write (compactly or not).
        Parameters:
        writer - to write content to
        compact - if true, then write compactly, if false, write with pretty printing
        Since:
        5.2.1
      • print

        public void  writer)
        Prints the JSONObject to the writer compactly (with no extra whitespace).
      • prettyPrint

        public void  writer)
        Prints the JSONObject to the writer using indentation (two spaces per indentation level).