Package com.streambase.sb.unittest
Class JSONSingleQuotesTupleMaker
java.lang.Object
com.streambase.sb.unittest.AbstractTupleMaker<String>
com.streambase.sb.unittest.JSONTupleMaker
com.streambase.sb.unittest.JSONSingleQuotesTupleMaker
- All Implemented Interfaces:
TupleMaker<String>
A factory to build
Tuples from JSON formatted Strings that may use
the single quote character ' in lieu of the double quote character ".
Strings will have every ' replaced by ", and then processed.
by JSONTupleMaker
The intent of this Maker is to provide assistance to Java developers writing JSON Strings
- Since:
- 6.6
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JSONSingleQuotesTupleMakerStaticJSONSingleQuotesTupleMakerinstance suitable as argument toEnqueuerandExpectermethods that need aTupleMaker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTuple(Schema schema, String str) create aTuples from an input objectprotected StringThis method will replace'to"in the entire argument stringMethods inherited from class com.streambase.sb.unittest.AbstractTupleMaker
createTuples, createTuples
-
Field Details
-
MAKER
StaticJSONSingleQuotesTupleMakerinstance suitable as argument toEnqueuerandExpectermethods that need aTupleMaker- See Also:
-
-
Constructor Details
-
JSONSingleQuotesTupleMaker
public JSONSingleQuotesTupleMaker()
-
-
Method Details
-
createTuple
Description copied from interface:TupleMakercreate aTuples from an input object- Specified by:
createTuplein interfaceTupleMaker<String>- Overrides:
createTuplein classJSONTupleMaker- Parameters:
schema- the schema for the tuplestr- the input data to build it from- Returns:
- the result tuple
- Throws:
StreamBaseException- Error creating tuple
-
preProcessJSONString
-