Best Practices: Calling JSON web services
NOTE: To convert a JSON file to XML, please consult the following: Convert JSON to XML using the JSON Preprocessor
Generally JSON web services should be called with the “Content-Type” header set to “application/json”, the “Content Type” field set to “XML”, and the “Character Set” field for the return set to “UTF-8”. This is because the request and response should be UTF-8. Setting the “Content Type” to “XML” ensures the request will be in UTF-8. Setting the “Character Set” ensures that eFORMz will decode the response correctly. Setting the “Content-Type” header to “application/json” will override the value of “text/xml” that is the default when the “Content Type” field is set to XML. You may have issues if the request is not UTF-8 encoded and it contains character codes between 128 and 255. Not all web services use UTF-8, so you may have to adjust.