How to: Use OData to Return-Obtain a JSON Document
To obtain a document based on JSON
You can build applications that consume and display Dynamics NAV data using JSON. This example assumes that you have registered and published a page web service in Dynamics NAV. For more information, see Walkthrough: Creating and Interacting with a Page Web Service (OData).
Start Windows Internet Explorer. In the Address field, enter a URI in this format:
If Microsoft Dynamics NAV Server is running on the local computer and is using the default Microsoft Dynamics NAV Server instance and OData port, and you have published a web service that is based on page 21 that is called Customer, then the address is:
This generates a text file that contains metadata and data from the web service. You can open the file from the browser, or you can save it to disk.
The value of the format attribute must be lowercase:
If you want to consume the web service as JSON-P, you can add the
?$callback=<callback function name>parameter.
You can use a similar URI to return the web service as an AtomPub document, in which case the attribute is
?$format=atom. For more information, see How to: Use OData to Return-Obtain an AtomPub Document.