Added online writer that serializes events into json and pushes the json string to python.