JSONToTuple says:
Atributes from the input stream that match those in the output stream will be automaticall copied over. However, if they also exist in the JSON input, their assigned value will be of that specified in the JSON.
In this case I have two output attributes that need to be set from the JSON (d, ts) and a number of input attributes (deviceId, deviceType) that need to be copied from input to output.
JSONToTuple says:
Atributes from the input stream that match those in the output stream will be automaticall copied over. However, if they also exist in the JSON input, their assigned value will be of that specified in the JSON.
However this does not appear to work, input attributes that are not in the JSON value are set to the default value. While the code at line 174 does the auto assignment from input to output, I think it is being overriden again at line 192: https://github.com/IBMStreams/streamsx.json/blob/master/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JSONToTuple.java#L192
In this case I have two output attributes that need to be set from the JSON (d, ts) and a number of input attributes (deviceId, deviceType) that need to be copied from input to output.