I have a piece of JSON that looks like this:
[
{
\"$id\": \"1\",
\"Name\": \"James\",
\"BirthDate\": \"1983-03-08T00:00Z\",
\"LastModified\
I had problem with $ref deserialization. PreserveReferencesHandling helps only if you have metadata located at the beginning of the request/response. Otherwise I recommend using those:
var settings = new JsonSerializerSettings();
settings.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
settings.MetadataPropertyHandling = MetadataPropertyHandling.Ignore; //ign
var deserializedObjects = Newtonsoft.Json.JsonConvert.DeserializeObject(requestResult.Content, settings);
Regarding to https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_MetadataPropertyHandling.htm
Default 0 Read metadata properties located at the start of a JSON object.
ReadAhead 1 Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
Ignore 2 Do not try to read metadata properties.