Namespace com.teracloud.streams.json
JSON support for SPL. A JSON object is encoded within a tuple as an rstring attribute containing the serialized object using UTF-8 encoding. The common paradigm is to use an attribute named jsonString, Json may be used to represent a complete tuple that is just a JSON object, or an attribute within a stream schema.
Tuples are converted to JSON objects using the operator TupleToJSON or the function tupleToJSON(T). SPL values are converted using the functions toJSON(S,T) or mapToJSON(map<S,T>).
Operators
- JSONToTuple: Converts JSON strings into SPL tuples.
- TupleToJSON: Converts incoming tuples to JSON Strings.
Functions
- extractFromJSON(rstring, T): Extract values from JSON string accordingly to a given tuple.
- getParseError(JsonParseStatus.status): Get parse error string.
- mapToJSON(map<S, T>): Convert a map to JSON object encoded as a serialized JSON string.
- mapToJSON(map<S, T>, rstring): Convert a map to JSON object encoded as a serialized JSON string.
- parseJSON(rstring, E): Parse JSON string (used in conjunction with queryJSON function).
- parseJSON(rstring, JsonParseStatus.status, uint32, E): Parse JSON string (used in conjunction with queryJSON function).
- queryJSON(rstring, T, E): Query JSON object for integral value with a given path (parseJSON function should be run before).
- queryJSON(rstring, T, E): Query JSON object for floatingpoint value with a given path (parseJSON function should be run before).
- queryJSON(rstring, T, E): Query JSON object for string value with a given path (parseJSON function should be run before).
- queryJSON(rstring, T, JsonStatus.status, E): Query JSON object for integral value with a given path (parseJSON function should be run before).
- queryJSON(rstring, T, JsonStatus.status, E): Query JSON object for floatingpoint value with a given path (parseJSON function should be run before).
- queryJSON(rstring, T, JsonStatus.status, E): Query JSON object for string value with a given path (parseJSON function should be run before).
- queryJSON(rstring, boolean, E): Query JSON object for boolean value with a given path (parseJSON function should be run before).
- queryJSON(rstring, boolean, JsonStatus.status, E): Query JSON object value with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, E): Query JSON object for list of integrals with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, E): Query JSON object for list of floatingpoint values with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, E): Query JSON object for list of strings with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, JsonStatus.status, E): Query JSON object for list of integrals with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, JsonStatus.status, E): Query JSON object for list of floatingpoint values with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<T>, JsonStatus.status, E): Query JSON object for list of strings with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<boolean>, E): Query JSON object for list of booleans with a given path (parseJSON function should be run before).
- queryJSON(rstring, list<boolean>, JsonStatus.status, E): Query JSON object for list of booleans with a given path (parseJSON function should be run before).
- toJSON(S, T): Convert a value to JSON object with a single key encoded as a serialized JSON string.
- toJSON(S, T, rstring): Convert a value to JSON object with a single key encoded as a serialized JSON string.
- tupleToJSON(T): Convert a tuple to JSON object encoded as a serialized JSON String.
- tupleToJSON(T, rstring): Convert a tuple to JSON object encoded as a serialized JSON String.
Types
- Json: Default tuple type for representing JSON object.
- JsonIndex.type_1: Single-value enum type with value JsonIndex._1 to reference internal stored JSON object
- JsonIndex.type_10: Single-value enum type with value JsonIndex._10 to reference internal stored JSON object
- JsonIndex.type_11: Single-value enum type with value JsonIndex._11 to reference internal stored JSON object
- JsonIndex.type_12: Single-value enum type with value JsonIndex._12 to reference internal stored JSON object
- JsonIndex.type_13: Single-value enum type with value JsonIndex._13 to reference internal stored JSON object
- JsonIndex.type_14: Single-value enum type with value JsonIndex._14 to reference internal stored JSON object
- JsonIndex.type_15: Single-value enum type with value JsonIndex._15 to reference internal stored JSON object
- JsonIndex.type_16: Single-value enum type with value JsonIndex._16 to reference internal stored JSON object
- JsonIndex.type_17: Single-value enum type with value JsonIndex._17 to reference internal stored JSON object
- JsonIndex.type_18: Single-value enum type with value JsonIndex._18 to reference internal stored JSON object
- JsonIndex.type_19: Single-value enum type with value JsonIndex._19 to reference internal stored JSON object
- JsonIndex.type_2: Single-value enum type with value JsonIndex._2 to reference internal stored JSON object
- JsonIndex.type_20: Single-value enum type with value JsonIndex._20 to reference internal stored JSON object
- JsonIndex.type_3: Single-value enum type with value JsonIndex._3 to reference internal stored JSON object
- JsonIndex.type_4: Single-value enum type with value JsonIndex._4 to reference internal stored JSON object
- JsonIndex.type_5: Single-value enum type with value JsonIndex._5 to reference internal stored JSON object
- JsonIndex.type_6: Single-value enum type with value JsonIndex._6 to reference internal stored JSON object
- JsonIndex.type_7: Single-value enum type with value JsonIndex._7 to reference internal stored JSON object
- JsonIndex.type_8: Single-value enum type with value JsonIndex._8 to reference internal stored JSON object
- JsonIndex.type_9: Single-value enum type with value JsonIndex._9 to reference internal stored JSON object
- JsonParseStatus.status: Errors returned by parseJSON()
- JsonStatus.status: Errors returned by queryJSON()