parsing additional special properties (other than $id, $ref, $type, &value and $values)


Get or sets the additional special properties (cfr $id, $ref, $type, &value and $values) and it handling functions.
ex: A json can contain a special deferred property:
"Patient": {
 "$deferred": "http://server/patients/457892/",
so you can create something like oData Deferred Content http://www.odata.org/developers/protocols/json-format#DeferredContent

SpecialPropertiesReadHandling.Add("$deferred", (reader, objectType, contract, member, existingValue, target, reference, serializer) =>
string value = (reader.Value != null) ? reader.Value.ToString() : null;

Debug.WriteLine(value); //in our example will print "http://server/patients/457892/" //here we can do some cool stuff like creating a dynamic proxy that will handle the deferred loading reader.Read();
return null;

setting the "$deferred" property can be done by a custom converter

file attachments

Closed May 4, 2013 at 8:58 AM by JamesNK
I don't want to add this. You might be able to get something similar from combining ExtensionData (new feature just added) with an on deserialized event.


ashutoshraina wrote Jan 8, 2012 at 7:30 PM

I am not sure if i understand deeply enough to make a comment . If i want to a add $ref property to a JSONSchema , can your patch help ? Is so how ?

wrote Dec 13, 2012 at 11:55 PM

wrote Feb 22, 2013 at 2:48 AM

wrote Mar 22, 2013 at 12:58 PM

wrote May 4, 2013 at 8:58 AM

wrote May 16, 2013 at 1:37 PM