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 buildTuple
s from JSON formattedString
s that may use the single quote character'
in lieu of the double quote character"
. Strings will have every'
replaced by"
, and then processed. byJSONTupleMaker
The 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 JSONSingleQuotesTupleMaker
MAKER
StaticJSONSingleQuotesTupleMaker
instance suitable as argument toEnqueuer
andExpecter
methods that need aTupleMaker
-
Constructor Summary
Constructors Constructor Description JSONSingleQuotesTupleMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tuple
createTuple(Schema schema, String str)
create aTuple
s from an input objectprotected String
preProcessJSONString(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
StaticJSONSingleQuotesTupleMaker
instance suitable as argument toEnqueuer
andExpecter
methods that need aTupleMaker
- See Also:
JSONTupleMaker
-
-
Method Detail
-
createTuple
public Tuple createTuple(Schema schema, String str) throws StreamBaseException
Description copied from interface:TupleMaker
create aTuple
s from an input object- Specified by:
createTuple
in interfaceTupleMaker<String>
- Overrides:
createTuple
in classJSONTupleMaker
- Parameters:
schema
- the schema for the tuplestr
- the input data to build it from- Returns:
- the result tuple
- Throws:
StreamBaseException
- Error creating tuple
-
-