Class RMJSONWriter

java.lang.Object
com.inductiveautomation.rm.archiver.RMJSONWriter

public class RMJSONWriter extends Object
Writes a JSON to string.
  • Constructor Details

    • RMJSONWriter

      public RMJSONWriter()
  • Method Details

    • getIndent

      public String getIndent()
      Returns the current indent.
    • setIndent

      public RMJSONWriter setIndent(String anIndent)
      Sets the current indent string.
    • isCompacted

      public boolean isCompacted()
      Returns whether writer compacts JSON (no indent or newline).
    • setCompacted

      public RMJSONWriter setCompacted(boolean aValue)
      Sets whether writer compacts JSON (no indent or newline).
    • getString

      public String getString(RMJSONNode aNode)
      Returns a string for given JSON node.
    • getStringBuffer

      public StringBuffer getStringBuffer(RMJSONNode aNode)
      Returns a string buffer for given JSON node.
    • append

      protected StringBuffer append(StringBuffer aSB, RMJSONNode aNode)
      Returns a string buffer for given JSON node.
    • appendNewlineIndent

      protected StringBuffer appendNewlineIndent(StringBuffer aSB)
      Appends newline and indent.
    • appendNewlineIndent

      protected StringBuffer appendNewlineIndent(StringBuffer aSB, int aLevel)
      Appends newline and indent.
    • writeJSON

      public void writeJSON(RMJSONNode aNode, String aPath)
      Writes the given JSON object to given file path.
    • isDeep

      protected boolean isDeep(RMJSONNode aNode)
      Returns whether given node has child Map or List of Map/List.