Package snap.props

Class PropArchiverJS

java.lang.Object
snap.props.PropArchiver
snap.props.PropArchiverJS

public class PropArchiverJS extends PropArchiver
A PropArchiver subclass specifically to convert to/from JSON.
  • Constructor Details

    • PropArchiverJS

      public PropArchiverJS()
      Constructor.
  • Method Details

    • writePropObjectToJSON

      public JSObject writePropObjectToJSON(PropObject aPropObject)
      Converts a PropObject to JSON.
    • readPropObjectFromJSONSource

      public Object readPropObjectFromJSONSource(Object aSource)
      Reads a PropObject from JSON source.
    • readPropObjectFromJSONString

      public Object readPropObjectFromJSONString(String jsonString)
      Reads a PropObject from JSON String.
    • readPropObjectFromJSONBytes

      public Object readPropObjectFromJSONBytes(byte[] theBytes)
      Reads a PropObject from JSON.
    • readPropObjectFromJSON

      public PropObject readPropObjectFromJSON(JSObject objectJS)
      Reads a PropObject from JSON.
    • readResources

      protected void readResources(JSObject anElement)
      Reads resources from objects in given JS (top-level) object, converts from ASCII encoding and adds to archiver.