The JSON protocol handler parses JSON documents.

Options

Example

PQL

json = ACCESS({
    source='json', 
    wrapper='GenericPull',
    transport='File',
    protocol='JSON',
    dataHandler='KeyValueObject',   
    options=[['filename','scrobbles-2006-10.json']]
/// schema=[['timestamp','STARTTIMESTAMP'], ['timestamp2','ENDTIMESTAMP']]   
})
SENDERjson = SENDER({ 
    transport='File', 
    wrapper='GenericPush', 
    protocol='JSON', 
    dataHandler='KeyValueObject', 
    SINK="SENDERjson", 
    options=[ 
        ['filename','${WORKSPACEPROJECT}\testdata\tupletokeyvalue\output.json'], 
        ['json.write.metadata','true'],
        ['json.write.starttimestamp','metadata.starttimestamp'], 
        ['json.write.endtimestamp','metadata.endtimestamp'] 
    ]}, tupletokeyvalue0)

 

CQL

CREATE STREAM line (symbol String, points Double)   
    WRAPPER 'GenericPush'
    PROTOCOL 'JSON'
    TRANSPORT 'File'
    DATAHANDLER 'Tuple'