Package org.polkadot.types.rpc
Class Json
- java.lang.Object
-
- com.alibaba.fastjson.JSON
-
- com.alibaba.fastjson.JSONObject
-
- org.polkadot.types.rpc.Json
-
- All Implemented Interfaces:
com.alibaba.fastjson.JSONAware,com.alibaba.fastjson.JSONStreamAware,java.io.Serializable,java.lang.Cloneable,java.lang.reflect.InvocationHandler,java.util.Map<java.lang.String,java.lang.Object>,Codec
- Direct Known Subclasses:
ChainProperties,NetworkState
public class Json extends com.alibaba.fastjson.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- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Json(java.lang.Object value)
-
Method Summary
Modifier and Type Method Description booleaneq(java.lang.Object other)Compares the value of the input to see if there is a matchintgetEncodedLength()Always 0, never encodes as a Uint8ArraybooleanisEmpty()Checks if the value is an empty valuejava.lang.StringtoHex()Unimplemented, will throwjava.lang.ObjecttoJson()Converts the Object to JSON, typically used for RPC transfersbyte[]toU8a(boolean isBare)Unimplemented, will throw-
Methods inherited from class com.alibaba.fastjson.JSONObject
clear, clone, containsKey, containsValue, entrySet, equals, fluentClear, fluentPut, fluentPutAll, fluentRemove, get, getBigDecimal, getBigInteger, getBoolean, getBooleanValue, getByte, getBytes, getByteValue, getDate, getDouble, getDoubleValue, getFloat, getFloatValue, getInnerMap, getInteger, getIntValue, getJSONArray, getJSONObject, getLong, getLongValue, getObject, getObject, getObject, getShort, getShortValue, getSqlDate, getString, getTimestamp, hashCode, invoke, keySet, put, putAll, remove, size, values
-
Methods inherited from class com.alibaba.fastjson.JSON
handleResovleTask, parse, parse, parse, parse, parse, parse, parse, parse, parseArray, parseArray, parseArray, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, setDefaultTypeKey, toJavaObject, toJavaObject, toJavaObject, toJavaObject, toJSON, toJSON, toJSON, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONStringWithDateFormat, toJSONStringZ, toString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONStringTo
-
-
-
-
Method Detail
-
getEncodedLength
public int getEncodedLength()
Always 0, never encodes as a Uint8Array- Specified by:
getEncodedLengthin interfaceCodec
-
isEmpty
public boolean isEmpty()
Checks if the value is an empty value
-
eq
public boolean eq(java.lang.Object other)
Compares the value of the input to see if there is a match
-
toHex
public java.lang.String toHex()
Unimplemented, will throw
-
toJson
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers
-
-