Package io.ably.lib.util
Class Serialisation
java.lang.Object
io.ably.lib.util.Serialisation
public class Serialisation
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSerialisation.FromJsonElement<T>static classSerialisation.HttpBodyHandler<T>static classSerialisation.HttpResponseHandler<T> -
Field Summary
Fields Modifier and Type Field Description static com.google.gson.Gsongsonstatic com.google.gson.GsonBuildergsonBuilderstatic com.google.gson.JsonParsergsonParserstatic Serialisation.HttpBodyHandler<com.google.gson.JsonElement>httpBodyHandlerstatic Serialisation.HttpResponseHandler<com.google.gson.JsonElement>httpResponseHandlerstatic org.msgpack.core.MessagePack.PackerConfigmsgpackPackerConfigstatic org.msgpack.core.MessagePack.UnpackerConfigmsgpackUnpackerConfig -
Constructor Summary
Constructors Constructor Description Serialisation() -
Method Summary
Modifier and Type Method Description static byte[]gsonToMsgpack(com.google.gson.JsonElement json)static voidgsonToMsgpack(com.google.gson.JsonElement json, org.msgpack.core.MessagePacker packer)static com.google.gson.JsonElementjsonBytesToGson(byte[] bytes)static <T> TjsonBytesToGson(byte[] bytes, java.lang.Class<T> klass)static com.google.gson.JsonElementmsgpackToGson(byte[] bytes)static com.google.gson.JsonElementmsgpackToGson(org.msgpack.value.Value value)
-
Field Details
-
gsonParser
public static final com.google.gson.JsonParser gsonParser -
gsonBuilder
public static final com.google.gson.GsonBuilder gsonBuilder -
gson
public static final com.google.gson.Gson gson -
msgpackPackerConfig
public static final org.msgpack.core.MessagePack.PackerConfig msgpackPackerConfig -
msgpackUnpackerConfig
public static final org.msgpack.core.MessagePack.UnpackerConfig msgpackUnpackerConfig -
httpResponseHandler
-
httpBodyHandler
-
-
Constructor Details
-
Serialisation
public Serialisation()
-
-
Method Details
-
gsonToMsgpack
public static byte[] gsonToMsgpack(com.google.gson.JsonElement json) -
msgpackToGson
public static com.google.gson.JsonElement msgpackToGson(byte[] bytes) -
jsonBytesToGson
public static com.google.gson.JsonElement jsonBytesToGson(byte[] bytes) -
jsonBytesToGson
public static <T> T jsonBytesToGson(byte[] bytes, java.lang.Class<T> klass) -
gsonToMsgpack
public static void gsonToMsgpack(com.google.gson.JsonElement json, org.msgpack.core.MessagePacker packer) -
msgpackToGson
public static com.google.gson.JsonElement msgpackToGson(org.msgpack.value.Value value)
-