Developer Documentation Library > Interviewer - Server > Architecture > Web Service tier > Interview Web Service implementation > JSON, XML, and HTML data interaction
 
JSON, XML, and HTML data interaction
Interview Web Service behavior describes how HTTP requests are forwarded to the mrIEng, how responses from mrIEng are transferred back. and how this process occurs asynchronously. It is necessary to translate the XML, JSON and HTML post parameters in the HTTP request to Player XML, and from the Player XML back to the Interview Web Service XML, JSON and HTML.
The interaction between interview XML or JSON and Player XML is handled via XmlReader and XmlWriter objects. Note that JsonReaderWriterFactory can create JSON XmlReader and XmlWriter classes. The XmlReader.Read() method is used to read each incoming interview XML, Player XML, or JSON element or attribute. When handling each node that is read, the appropriate XmlWriter.WriteXXX() method is called in order to transfer the node to the output. Most nodes can be transferred, without change, straight from the input to the output. Some nodes require minor transformations (as described in Errors) on the request and response format.
It is possible to send the XmlWriter output directly to the client by defining the web service method as returning void and writing the response directly into the HTTP context object.
When the format query parameter is HTML the interactions to and from the Player XML are handled by the HTML Player. The form action for the post is set to the same URL as that used for XML or JSON responses.
See also
Interview Web Service implementation