add support for JSON documents served by web service.