-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.12.2
-
Component/s: None
-
None
-
(copied to CRM)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
BsonDocument.Parse("{ \"val\": -99999996802856924650656260769173209088 }");
'BsonDocument.Parse("{ \"val\": -99999996802856924650656260769173209088 }")' threw an exception of type 'System.OverflowException' Data: {System.Collections.ListDictionaryInternal} HResult: -2146233066 HelpLink: null InnerException: null Message: "Value was either too large or too small for an Int64." Source: "mscorlib" StackTrace: " at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)\r\n at MongoDB.Bson.IO.JsonScanner.GetNumberToken(JsonBuffer buffer, Int32 firstChar)\r\n at MongoDB.Bson.IO.JsonScanner.GetNextToken(JsonBuffer buffer)\r\n at MongoDB.Bson.IO.JsonReader.PopToken()\r\n at MongoDB.Bson.IO.JsonReader.ReadBsonType()\r\n at MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)\r\n at MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)\r\n at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize[TValue](IBsonSerializer`1 serializer, BsonDeserializationContext context)\r\n at MongoDB.Bson.BsonDocument.Parse(String json)" TargetSite: {Int64 ParseInt64(System.String, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo)}
Note that the same JSON string will parse using JObject.Parse:
Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
Newtonsoft.Json.Linq.JObject.Parse("{ \"val\": -99999996802856924650656260769173209088 }");