Added JSON support for posting data