Package snap.util
Class JSValue
java.lang.Object
snap.util.JSValue
Represents a node in a JSON tree.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Standard equals implementation.Returns the node as a native object.getValue()
Returns the value.Returns the value as String if type is String.int
hashCode()
Standard hashCode implementation.static JSValue
readSource
(Object aSource) Reads JSON from a source.protected void
Sets the value.toString()
Returns a string representation of node (as JSON, of course).Returns a string representation of node (as JSON, of course).
-
Constructor Details
-
JSValue
public JSValue()Creates a new node. -
JSValue
Creates a new node.
-
-
Method Details
-
getValue
Returns the value. -
setValue
Sets the value. -
getValueAsString
Returns the value as String if type is String. -
getNative
Returns the node as a native object. -
equals
Standard equals implementation. -
hashCode
public int hashCode()Standard hashCode implementation. -
toString
Returns a string representation of node (as JSON, of course). -
toStringCompacted
Returns a string representation of node (as JSON, of course). -
readSource
Reads JSON from a source.
-