Bug 23788 - JavaScriptSerializer fails serialize/deserialize null
Summary: JavaScriptSerializer fails serialize/deserialize null
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 3.8.0
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-10-13 14:51 UTC by mewan
Modified: 2014-10-13 14:51 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description mewan 2014-10-13 14:51:27 UTC
The following unit test fails when run under mono:

        private static readonly JavaScriptSerializer _serializer = new JavaScriptSerializer();

         * Fails under Mono!!
         * System.ArgumentException : Invalid JSON string
        public void SerialDeserialNullString()
            var str = _serializer.Serialize(null);

I get the same result when testing this against any nullable type:  arrays, objects, etc.  This test passes when run on Windows using Microsoft's c-sharp libs.

Note You need to log in before you can comment on or make changes to this bug.