Class HazelcastJsonValue

java.lang.Object
com.hazelcast.core.HazelcastJsonValue
All Implemented Interfaces:
Comparable<HazelcastJsonValue>

public final class HazelcastJsonValue extends Object implements 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 Details

    • HazelcastJsonValue

      public HazelcastJsonValue(@Nonnull String value)
      Creates a HazelcastJsonValue from the given string.
      Parameters:
      value - a non-null JSON string
  • Method Details