Try the JavaScriptSerializer instead of the DataContractJsonSerializer
JavaScriptSerializer serializer = new JavaScriptSerializer();
var output = serializer.Serialize(your_anon_object);
More Related Contents:
- DataContractJsonSerializer – Deserializing DateTime within List
- parse JSON using json.net c# [closed]
- Parse value from http web response stream
- Convert JSON to DataTable
- Casting interfaces for deserialization in JSON.NET
- How to let an ASMX file output JSON
- How to show the “paste Json class” in visual studio 2012 when clicking on Paste Special?
- A generic list of anonymous class
- How to post an array of complex objects with JSON, jQuery to ASP.NET MVC Controller?
- Json Convert empty string instead of null
- How to Deserialize JSON data?
- Posting JSON Data to ASP.NET MVC
- How to flatten an ExpandoObject returned via JsonResult in asp.net mvc?
- How to make JSON.Net serializer to call ToString() when serializing a particular type?
- caliburn.micro serialization issue when implementing PropertyChangedBase
- JSON.net serialize directly from oledbconnection
- JSON deserialization – Map array indices to properties with JSON.NET
- Parsing a JSON file with .NET core 3.0/System.text.Json
- Strings sent through Web API’s gets wrapped in quotes
- Return Json, but it includes backward slashes “\”, which I don’t want
- How to recursively populate a TreeView with JSON data
- Anonymous Type vs Dynamic Type
- Deserializing a JSON file with JavaScriptSerializer()
- C# JSON custom serialization
- Removing an element from a JSON response
- json net leading zeros (disable base-cast)
- How do I transform appsettings.json in a .NET Core MVC project?
- ASP.NET WebService is Wrapping my JSON response with XML tags
- Streaming large list of data as JSON format using Json.net
- Web API complex parameter properties are all null