Using Microsoft WebApi 2 (which uses the third party Json.NET library), let\'s say I return the following people
array:
var p1 = new Person(\"Alice\
No, $id
and $ref
is not part of the JSON standard (you'll notice it is not mentioned anywhere on JSON.org); it is a convention used by Json.Net to tag objects and refer to them for purposes of preserving the references on deserialization. Other JSON libraries may or may not follow the same convention. See Preserving Object References in the Json.Net documentation for more information.
NB: There are javascript methods that can handle resolving the $id
/$ref
notation from Json.Net. You may be interested in these examples: