Added possibility of passing JSON data directly
Added example of passing JSON data.