https://bugzilla.novell.com/show_bug.cgi?id=667058
https://bugzilla.novell.com/show_bug.cgi?id=667058#c0 Summary: "Invalid JSON primitive: null" when using Mono. Works fine with .Net Classification: Mono Product: Mono: Class Libraries Version: 2.8.x Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Development Blocker: Yes using System; using System.Web.Script.Serialization; // mono doesn't like objects that only have keys with null values // if you add another property with a non-null value, it works // works in both cases with .NET namespace Bug { public class Program { static int Main(string[] args) { String jsonStr = "{ \"a\" : { \"b\" : null } }"; JavaScriptSerializer jss = new JavaScriptSerializer(); Object jsonObject = jss.Deserialize<object>(jsonStr); Console.WriteLine(jsonObject.ToString()); return 0; } } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
