Class RMJSONNode
java.lang.Object
com.inductiveautomation.rm.archiver.RMJSONNode
Represents a node in a JSON tree.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionget(int anIndex) Returns the individual node at given index.Returns value for key if node type Map.Returns the value as Map if type is Map.protected RMJSONNodeReturns a JSON node of given value.getKeys()Returns keys list.getList()Returns the value as List if type is List.getMap()Returns the value as Map if type is Map.Converts a JSON object to Map.Returns the value as Number if type is Number.Returns the value as String if type is String.getType()Returns the the node type.getValue()Returns the value.static voidSimple main implementation to read standard in and re-print JSON.Sets value for key.static RMJSONNodereadSource(Object aSource) Creates a JSON node tree from a JSON string or JSON String byte source.protected voidsetType(RMJSONNode.Type aType) Sets the node type.protected RMJSONNodeSets the value.intsize()Returns the number of JSON nodes if node type List.toString()Returns a string representation of node (as JSON, of course).Returns a string representation of node (as JSON, of course).
- 
Constructor Details- 
RMJSONNodepublic RMJSONNode()Creates a new node.
- 
RMJSONNodeCreates a new node.
 
- 
- 
Method Details- 
readSourceCreates a JSON node tree from a JSON string or JSON String byte source.- Throws:
- RMJSONReader.RMJSONException
 
- 
getTypeReturns the the node type.
- 
setTypeSets the node type.
- 
getValueReturns the value.
- 
setValueSets the value.
- 
getReturns value for key if node type Map.
- 
putSets value for key.
- 
getKeysReturns keys list.
- 
sizepublic int size()Returns the number of JSON nodes if node type List.
- 
getReturns the individual node at given index.
- 
getJSONReturns a JSON node of given value.
- 
getMapReturns the value as Map if type is Map.
- 
getListReturns the value as List if type is List.
- 
getStringReturns the value as String if type is String.
- 
getNumberReturns the value as Number if type is Number.
- 
getBooleanReturns the value as Map if type is Map.
- 
getNonJSONConverts a JSON object to Map.
- 
toStringReturns a string representation of node (as JSON, of course).
- 
toStringCompactedReturns a string representation of node (as JSON, of course).
- 
mainSimple main implementation to read standard in and re-print JSON.
 
-