Class RMJSONArchiver
java.lang.Object
com.inductiveautomation.rm.archiver.RMJSONArchiver
An archiver to read/write objects from/to JSON.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An interface so objects can provide archival class to archiver.static interface
An interface so objects can provide archival attributes to archiver.static interface
An interface so objects can provide archival values to archiver.static interface
An interface so objects can set archival values from archiver. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new archiver.RMJSONArchiver
(String... theImports) Creates a new archiver for given import(s). -
Method Summary
Modifier and TypeMethodDescriptionAdds an import.protected Class
getClassForName
(String aClassName) Returns a class for name.protected Class
getClassForNameImpl
(String aClassName) Returns a class for name.Returns the class string.protected String
getClassPath
(Object anObj) Returns a class path for an object (shortend if in imports).protected String
getClassPathImpl
(String classPath) Returns a class path for an object (shortend if in imports).protected Object
Returns a value for a key.readObject
(RMJSONNode aNode) Read an object from JSON.readObject
(RMJSONNode aNode, Object intoObj) Read an object from JSON.readObject
(Object aSource) Read an object from JSON.readObject
(Object aSource, Object intoObject) Read an object from JSON.protected void
Set a value for a key.writeObject
(Object anObj) Write an object to JSON.writeObject
(Object anObj, RMJSONNode aNode) Write an object to JSON.
-
Constructor Details
-
RMJSONArchiver
public RMJSONArchiver()Creates a new archiver. -
RMJSONArchiver
Creates a new archiver for given import(s).
-
-
Method Details
-
getClassId
Returns the class string. -
readObject
Read an object from JSON.- Throws:
RMJSONReader.RMJSONException
-
readObject
Read an object from JSON.- Throws:
RMJSONReader.RMJSONException
-
readObject
Read an object from JSON. -
readObject
Read an object from JSON. -
writeObject
Write an object to JSON. -
writeObject
Write an object to JSON. -
getValue
Returns a value for a key. -
setValue
Set a value for a key. -
addImport
Adds an import. -
getClassPath
Returns a class path for an object (shortend if in imports). -
getClassPathImpl
Returns a class path for an object (shortend if in imports). -
getClassForName
Returns a class for name. -
getClassForNameImpl
Returns a class for name.
-