Package com.hazelcast.core
Class HazelcastJsonValue
java.lang.Object
com.hazelcast.core.HazelcastJsonValue
- All Implemented Interfaces:
Comparable<HazelcastJsonValue>
HazelcastJsonValue is a wrapper for JSON formatted strings. It is preferred
to store HazelcastJsonValue instead of Strings for JSON-formatted strings.
It allows you to run predicates/aggregations and use indexes on the
attributes of the underlying JSON strings.
HazelcastJsonValue can be queried for fields in Hazelcast's queries. See
Predicates
.
When querying, numbers in JSON strings are treated as either
Long
or Double
. Strings, booleans and nulls are
treated as their Java counterparts.
HazelcastJsonValue stores the given string as is. It is not validated.
Ill-formatted JSON strings may cause false positive or false negative
results in queries. null
string is not allowed.
-
Constructor Summary
ConstructorDescriptionHazelcastJsonValue
(String value) Creates a HazelcastJsonValue from the given string. -
Method Summary
-
Constructor Details
-
HazelcastJsonValue
Creates a HazelcastJsonValue from the given string.- Parameters:
value
- a non-null JSON string
-
-
Method Details
-
getValue
-
toString
Returns unaltered string that was used to create this object. -
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<HazelcastJsonValue>
-