Passing input data as JSON-encoded string in POST request