Json returned from WebAPI project is stripping trailing zeros in Request.CreateResponse

The JSON being returned from my WebAPI controller is stripping the trailing zeros from dollar amounts (decimal data type in C#) during Request.CreateResponse(); all the numbers with 2 significant ...

Id #64997 | Release: None | Updated: Nov 9, 2015 at 7:47 PM by dblairski | Created: Nov 9, 2015 at 7:47 PM by dblairski

Different behavior of PreserveReferencesHandling.Arrays option with privius versions

serializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Arrays; List<SomeClass>, where SomeClass has properties SomeProperty and SomeList property which is List<SomeSubClass1> w...

Id #63786 | Release: None | Updated: Jul 30, 2015 at 10:16 AM by MykhayloA | Created: Jul 30, 2015 at 10:16 AM by MykhayloA

Private method reflection at deserialization

Hi We have the following problem with at deserialization time. We have task framework (plugin system) and a client server application. We need to send the tasks to the client in order to edit the...

Id #63733 | Release: None | Updated: Jul 20, 2015 at 9:39 AM by oscarito | Created: Jul 20, 2015 at 9:39 AM by oscarito

Windows 10: Error using Newtonsoft.JsonSeverity Code Description Project File Line

Hi I can use Newtonsoft.Json on Windows 10 in debug mode, but when using Release, it does not compile with the error: Assembly 'Newtonsoft.Json' invokes 'Attribute.GetCustomAttributes(Assembly)' ...

Id #63569 | Release: None | Updated: Jul 9, 2015 at 9:15 AM by AThenn | Created: Jun 23, 2015 at 2:50 PM by Dumdidum

GeoJson

Can I define a class list for GeoJson ? http://geojson.org/geojson-spec.html#feature-objects Is Newtonsoft support it?

Id #63492 | Release: None | Updated: May 30, 2015 at 1:14 AM by bfbd | Created: May 30, 2015 at 1:14 AM by bfbd

Schema generation does not apply MinLength to property marked with RequiredAttribute.

The RequiredAttribute has properties that allow the programmer to control AllowEmptyStrings. AllowEmptyStrings is false by default, and when false it should be treated as if the MinLength attribut...

Id #63439 | Release: None | Updated: May 15, 2015 at 8:21 PM by thebothead | Created: May 15, 2015 at 8:21 PM by thebothead

Can't deserialize Regular Expression

I don't seem to be able to have a JSON regular expression get deserialized correctly into a Regex object: public class Configuration { public string FieldName { get; set; } public Regex Sea...

Id #63239 | Release: None | Updated: May 5, 2015 at 5:02 PM by SetTrend | Created: May 5, 2015 at 5:02 PM by SetTrend

Json.net deserialization silent error byte[]

The following json is not correctly deserialized by Newtonsoft JSON.NET into byte[]: { ID:123, Name:'test', RowVersion: { $current: null, $current_uid: null, $parent_uid: 1, $type: "System.Byte[],...

Id #63126 | Release: None | Updated: Apr 30, 2015 at 5:48 PM by xaviergxf | Created: Apr 30, 2015 at 5:48 PM by xaviergxf

Conditional property serialization

Hello, I implemented custom JsonConverter by using JsonConverter abstract class and JsonConverterAttribute on some properties of object. In WriteJson abstract method, we can't access root object.S...

Id #63114 | Release: None | Updated: Apr 30, 2015 at 1:15 PM by berkayerkoy | Created: Apr 30, 2015 at 9:47 AM by berkayerkoy

Problem deserializing descendants of ConcurrentDictionary

Tested on 6.0.4, 6.0.8 and 7.0.1 beta. Let's say we have the class CustomConcurrentDictionary: public class CustomConcurrentDictionary: ConcurrentDictionary<string, List<SomeObject>> { } When I s...

Id #28293 | Release: None | Updated: Apr 1, 2015 at 7:25 AM by aiskrenov | Created: Apr 1, 2015 at 7:25 AM by aiskrenov