Class RMJSONWriter
java.lang.Object
com.inductiveautomation.rm.archiver.RMJSONWriter
Writes a JSON to string.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuffer
append
(StringBuffer aSB, RMJSONNode aNode) Returns a string buffer for given JSON node.protected StringBuffer
Appends newline and indent.protected StringBuffer
appendNewlineIndent
(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.boolean
Returns whether writer compacts JSON (no indent or newline).protected boolean
isDeep
(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.void
writeJSON
(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.
-