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>
public class JSONSingleQuotesTupleMaker extends JSONTupleMaker
A factory to buildTuples from JSON formattedStrings that may use the single quote character'in lieu of the double quote character". Strings will have every'replaced by", and then processed. byJSONTupleMakerThe intent of this Maker is to provide assistance to Java developers writing JSON Strings
- Since:
- 6.6
- See Also:
JSONTupleMaker,TupleMaker
-
-
Field Summary
Fields Modifier and Type Field Description static JSONSingleQuotesTupleMakerMAKERStaticJSONSingleQuotesTupleMakerinstance suitable as argument toEnqueuerandExpectermethods that need aTupleMaker
-
Constructor Summary
Constructors Constructor Description JSONSingleQuotesTupleMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TuplecreateTuple(Schema schema, String str)create aTuples from an input objectprotected StringpreProcessJSONString(String str)This method will replace'to"in the entire argument string-
Methods inherited from class com.streambase.sb.unittest.AbstractTupleMaker
createTuples, createTuples
-
-
-
-
Field Detail
-
MAKER
public static final JSONSingleQuotesTupleMaker MAKER
StaticJSONSingleQuotesTupleMakerinstance suitable as argument toEnqueuerandExpectermethods that need aTupleMaker- See Also:
JSONTupleMaker
-
-
Method Detail
-
createTuple
public Tuple createTuple(Schema schema, String str) throws StreamBaseException
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
-
-