You can specify the format of the data returned by the REST service at the end of the path information, as shown in the following examples.
/customer/123.xml returns customer information in Microsoft XML format.
The XML format is as expected by the Microsoft DataContractSerializer class for an
The XML returned for an object lists the properties in alphabetical order within each class of the hierarchy, working from the highest superclass down through each subclass.
/customer/123.json returns customer information in Microsoft JSON format.
The JSON format is as expected by the Microsoft DataContractJsonSerializer class. This format type does not support circular references or multiple references to the same object in the returned data. An exception is raised if a circular reference or multiple references to the same object are detected. This format is the default if no format was specified.
/customer/123.jsonn returns customer information in NewtonSoft JSON (JSONN) format.
The JSONN format is as expected by the NewtonSoft JSON class software. It differs from Microsoft in the structure, tags, and the format of some primitive types. The output includes identifiers for each object and references to already included objects, which enables the returned data to contain circular references and multiple references to the same object.
If the output format is not specified (for example, /customer/123), data is returned in Microsoft JSON format.