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
Tuple
s from JSON formatted String
s 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
Modifier and TypeFieldDescriptionstatic final JSONSingleQuotesTupleMaker
StaticJSONSingleQuotesTupleMaker
instance suitable as argument toEnqueuer
andExpecter
methods that need aTupleMaker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTuple
(Schema schema, String str) create aTuple
s from an input objectprotected String
This method will replace'
to"
in the entire argument stringMethods inherited from class com.streambase.sb.unittest.AbstractTupleMaker
createTuples, createTuples
-
Field Details
-
MAKER
StaticJSONSingleQuotesTupleMaker
instance suitable as argument toEnqueuer
andExpecter
methods that need aTupleMaker
- See Also:
-
-
Constructor Details
-
JSONSingleQuotesTupleMaker
public JSONSingleQuotesTupleMaker()
-
-
Method Details
-
createTuple
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
-
preProcessJSONString
This method will replace'
to"
in the entire argument string- Parameters:
str
- input string- Returns:
- resulting string after replacing every
'
to"
-