インターフェース RedisJsonSerializer.Splitter
- すべてのスーパーインターフェース:
RedisJsonSerializer, RedisSerializer<ObjectSE>
- 含まれているインターフェース:
RedisJsonSerializer
- 導入:
- 4.2
- 作成者:
- Moritz Halbritter
ネストされたクラスの概要
インターフェース RedisJsonSerializer から継承されたネストクラス / インターフェース
RedisJsonSerializer.Splitter方法の概要
修飾子と型メソッド説明default byte[]joinObject(MapSE<StringSE, byte[]> members) Create a JSON object from the given members.default ListSE<byte[]> splitArray(byte[] source) Extract immediate elements of a JSON array as individual JSON values.splitObject(byte[] source) Extract the immediate members of a JSON object as individual JSON values.インターフェース RedisJsonSerializer から継承されたメソッド
deserialize, deserialize, splitterインターフェース RedisSerializer から継承されたメソッド
canSerialize, deserialize, deserialize, getTargetType, serialize
方法の詳細
splitArray
Extract immediate elements of a JSON array as individual JSON values.メモ: The default implementation deserializes the array and serializes each element separately. This may change number formatting or precision. For example,
1.10may become1.1. Implementations should override this method to preserve the original bytes of each element.- パラメーター:
source- the JSON array to read.- 戻り値:
- the JSON bytes for each element in array order, or an empty list if the array is empty.
- 例外:
SerializationException- if the source is not a JSON array or cannot be read.
splitObject
Extract the immediate members of a JSON object as individual JSON values.メモ: Map keys contain the unescaped member names. Values contain the JSON bytes for each member. The default implementation deserializes the object and serializes each member value separately. See
splitArray(byte[])for the effect on number formatting and precision.- パラメーター:
source- the JSON object to read.- 戻り値:
- the members in source order, or an empty map if the object is empty.
- 例外:
SerializationException- if the source is not a JSON object or cannot be read.
joinObject
Create a JSON object from the given members.Map keys supply the member names, which are escaped as needed. Each value must contain a valid JSON value. Members are written in map iteration order.
メモ: The default implementation deserializes the member values and serializes the resulting object. See
splitArray(byte[])for the effect on number formatting and precision. Implementations can override this method to preserve the supplied JSON bytes for each value.- パラメーター:
members- the member names and their JSON bytes.- 戻り値:
- the JSON object as bytes, or the representation of
{}if the map is empty. - 例外:
SerializationException- if the object cannot be written.- 関連事項: