Class RMJSONWriter
java.lang.Object
com.inductiveautomation.rm.archiver.RMJSONWriter
Writes a JSON to string.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBufferappend(StringBuffer aSB, RMJSONNode aNode) Returns a string buffer for given JSON node.protected StringBufferAppends newline and indent.protected StringBufferappendNewlineIndent(StringBuffer aSB, int aLevel) Appends newline and indent.Returns the current indent.getString(RMJSONNode aNode) Returns a string for given JSON node.getStringBuffer(RMJSONNode aNode) Returns a string buffer for given JSON node.booleanReturns whether writer compacts JSON (no indent or newline).protected booleanisDeep(RMJSONNode aNode) Returns whether given node has child Map or List of Map/List.setCompacted(boolean aValue) Sets whether writer compacts JSON (no indent or newline).Sets the current indent string.voidwriteJSON(RMJSONNode aNode, String aPath) Writes the given JSON object to given file path.
-
Constructor Details
-
RMJSONWriter
public RMJSONWriter()
-
-
Method Details
-
getIndent
Returns the current indent. -
setIndent
Sets the current indent string. -
isCompacted
public boolean isCompacted()Returns whether writer compacts JSON (no indent or newline). -
setCompacted
Sets whether writer compacts JSON (no indent or newline). -
getString
Returns a string for given JSON node. -
getStringBuffer
Returns a string buffer for given JSON node. -
append
Returns a string buffer for given JSON node. -
appendNewlineIndent
Appends newline and indent. -
appendNewlineIndent
Appends newline and indent. -
writeJSON
Writes the given JSON object to given file path. -
isDeep
Returns whether given node has child Map or List of Map/List.
-