I added this code to my WebApiConfig register method and I got rid of all $id in JSON.
var json = config.Formatters.JsonFormatter;
json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None;
More Related Contents:
- How To Deserialize Dynamic dirty json data in node js posted by react [duplicate]
- JSON.NET: Why Use JToken–ever?
- JSON.net ContractResolver vs. JsonConverter
- json.net – how to add property $type ONLY on root object
- JObject.Parse modifies end of floating point values
- Deserialization of self-referencing properties does not work
- Json.NET get nested jToken value
- JSON.Net – Change $type field to another name?
- Self referencing loop detected in ASP.NET Core [duplicate]
- How to implement custom JsonConverter in JSON.NET?
- Does Json.NET cache types’ serialization information?
- Using JsonConvert.DeserializeObject to deserialize Json to a C# POCO class
- How to write a JSON file in C#?
- Private setters in Json.Net
- JSON.Net Self referencing loop detected
- Newtonsoft JSON dynamic property name
- JsonSerializerSettings and Asp.Net Core
- Newtonsoft JSON.net deserialization error where fields in JSON change order
- JSON serialize properties on class inheriting list [duplicate]
- Find and return JSON differences using newtonsoft in C#?
- Ignoring null fields in Json.net
- replace WCF built-in JavascriptSerializer with Newtonsoft Json.Net json serializer
- Convert DataTable to JSON with key per row
- Json.net serialize numeric properties as string
- Json.Net PopulateObject – update list elements based on ID
- JSON Deserialization – String Is Automatically Converted To Int
- Json.net rename properties
- Overriding Default Primitive Type Handling in Json.Net
- Newtonsoft JSON for .net is ignoring jsonproperty tags
- How to convert JSON to XML or XML to JSON in C#?