public class Json extends JSONObject implements Codec
Wraps the a JSON structure retrieve via RPC. It extends the standard JS Map with. While it implements a Codec, it is limited in that it can only be used with input objects via RPC, i.e. no hex decoding. Unlike a struct, this waps a JSON object with unknown keys
| Constructor and Description |
|---|
Json(java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
eq(java.lang.Object other)
Compares the value of the input to see if there is a match
|
int |
getEncodedLength()
Always 0, never encodes as a Uint8Array
|
boolean |
isEmpty()
Checks if the value is an empty value
|
java.lang.String |
toHex()
Unimplemented, will throw
|
java.lang.Object |
toJson()
Converts the Object to JSON, typically used for RPC transfers
|
byte[] |
toU8a(boolean isBare)
Unimplemented, will throw
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConstructorCodec, toU8apublic int getEncodedLength()
Always 0, never encodes as a Uint8Array
getEncodedLength in interface Codecpublic boolean isEmpty()
Checks if the value is an empty value
public boolean eq(java.lang.Object other)
Compares the value of the input to see if there is a match
public java.lang.String toHex()
Unimplemented, will throw
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers