Class TupleJSONUtil.SetTupleFromJSON

java.lang.Object
com.streambase.sb.TupleJSONUtil.SetTupleFromJSON
Enclosing class:
TupleJSONUtil

public static class TupleJSONUtil.SetTupleFromJSON extends Object
The Builder class which handles the setting of tuples from JSON Data. This has several parameters which can be specified using the respective builder methods. These builder methods are:
withParseStyle(com.streambase.sb.ParseStyle) whether to throw an exception when fields are missing from tuple's schema (ParseStyle.STRICT) or not (ParseStyle.LOOSE)
withTimestampStyle(com.streambase.sb.Timestamp.Type) timestampStyle Whether the numeric values in a timestamp field will be converted to an Timestamp.Type.INTERVAL or a Timestamp.Type.TIMESTAMP
withTimestampFormat(java.lang.String) the string representation of the timestamp format to use when converting
withEmptyStringValue(java.lang.String) the string specifying what an empty/null json field should evaluate to
Two static instances are provided: STRICT and LOOSE, which set all defaults except for the parseStyle, which instead corresponds to the instance name.
STRICT can be used as a plain default instance with no modifications.