Interface JsonValue
- All Known Subinterfaces:
JsonOperations.JsonResult
public interface JsonValue
Value abstraction for JSON payloads passed to
RedisJsonCommands.- Since:
- 4.2
- Author:
- Yordan Tsintsov, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]asBytes()Return the JSON representation of this value as raw bytes.asString()Return the JSON representation of this value as String.static JsonValueJSON null value.static JsonValueof(boolean value) JSON boolean from aboolean.static JsonValueof(double number) JSON number from adouble.static JsonValueof(float number) JSON number from afloat.static JsonValueof(int number) JSON number from anint.static JsonValueof(long number) JSON number from along.static JsonValueJSON number from aNumber.static JsonValueJSON string from a JavaString.static JsonValueraw(byte[] json) JSON value from a JSON document.static JsonValueJSON value from a JSON document.
-
Method Details
-
nullValue
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
raw
-
raw
-
asBytes
byte[] asBytes()Return the JSON representation of this value as raw bytes.- Returns:
- the raw JSON bytes. Returns
"null"if the value isnullValue().
-
asString
-