supporting json string or object for add_event