Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>"I don't care about metadata; I only care about the data"</p> <p>That's actually a great tagline for JSON Light as a whole :)</p> <p>The core principle of JSON light is that servers can cut down on unnecessary metadata in the payload. When a client does need a certain bit of metadata (for example, the URL it should use to edit the entity), the client can generate that URI itself based on common OData URI conventions.</p> <p>A client can control how much metadata the server should include in the payload by requesting one of the three different metadata levels: </p> <ul> <li>"application/json;odata=fullmetadata" for clients who need to use metadata and don't have a way to compute it themselves</li> <li>"application/json;odata=minimalmetadata" for clients who use metadata but are fine computing it themselves</li> <li>"application/json;odata=nometadata" for clients who don't care about any metadata whatsoever</li> </ul> <p>If you're writing a client that really doesn't care about any metadata at all (where metadata includes edit links, entity types, property types, stream information, navigation properties, etc.), then you can request "application/json;odata=nometadata" and you'll just get back a bag of properties.</p> <p>Even if you don't care about metadata, there are lots of little differences between JSON Verbose and JSON Light. I would strongly recommend relying on a library for this if you're in a language where one is available (for example, in .NET there's the WCF Data Services Client and in Javascript there's datajs or jaydata). Here's a list of a couple differences off the top of my head:</p> <ul> <li>In OData v2, DateTimes could be represented using the ticks-based format (e.g., <code>"lastUpdated": "\/Date(1240718400000)\/"</code>), but in v3 JSON only ISO 8601 is supported (e.g., <code>"1992-01-01T00:00:00"</code>)</li> <li>There is no "d" wrapper on results payloads anymore.</li> <li>Instead of a "results" wrapper for collection results, there is now a "value" wrapper</li> <li>Instead of "__count" for inline count, JSON Light uses "odata.count"</li> </ul> <p>As an example, take a look at the differences in the payload produced by this query:</p> <p>http://services.odata.org/v3/OData/OData.svc/Products?$inlinecount=allpages&amp;$top=2&amp;$format=application/json;odata=verbose</p> <p>Versus this:</p> <p>http://services.odata.org/v3/OData/OData.svc/Products?$inlinecount=allpages&amp;$top=2&amp;$format=application/json;odata=nometadata</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload