handle JSON data sent as "uploaded file", useful for stdin and curl