[x] I have verified that I am running the latest version of Nancy
[x] I have verified if the problem exist in both DEBUG and RELEASE mode
[x] I have searched open and closed issues to ensure it has not already been reported
Description
After upgrading to Nancy 2.0 (from 1.4.4), suddenly the binding mechanism no longer deserializes to Dictionary<string, string>. The dictionary is created, but remains empty.
Steps to Reproduce
var dict = new JavaScriptSerializer().Deserialize<Dictionary<string, string>>(@"{""data1"": ""hello"", ""data2"": ""world"" }");
Assert.AreEqual(2, dict.Count);
Works on 1.4, does not work on 2.0. This affects calling the Bind extension methods.
System Configuration
Nancy version: 2.0
Nancy host
[ ] Nancy.Hosting.Aspnet
[ ] Nancy.Hosting.Self
[ ] Nancy.Owin
[x] Other: Not hosted
Other Nancy packages and versions: N/A
Environment (Operating system, version and so on): Windows 10 Enterprise 1809, English (US); Visual Studio 2019 Enterprise
I am not entirely sure whether this is a bug, an intended change or an approved trade-off to simplify the JSON parser. If it won’t be fixed, it should at least be mentioned in the 2.0 upgrade guide.
Prerequisites
DEBUG
andRELEASE
modeDescription
After upgrading to Nancy 2.0 (from 1.4.4), suddenly the binding mechanism no longer deserializes to
Dictionary<string, string>
. The dictionary is created, but remains empty.Steps to Reproduce
Works on 1.4, does not work on 2.0. This affects calling the
Bind
extension methods.System Configuration
I am not entirely sure whether this is a bug, an intended change or an approved trade-off to simplify the JSON parser. If it won’t be fixed, it should at least be mentioned in the 2.0 upgrade guide.