Closed jfontsaballs closed 5 years ago
Thanks will look into it.
The issue is resolved. Please test with the branch if you can. I will make it a nuget package once i fix the other pending issues.
Thanks,
Issue seems resolved.
static void Main()
{
var netJsonSettings = new NetJSONSettings {
CaseSensitive = true,
DateFormat = NetJSONDateFormat.ISO,
IncludeTypeInformation = true,
UseEnumString = true,
UseStringOptimization = true
};
var myString = "MyString";
var serialized = NetJSON.NetJSON.Serialize(myString, netJsonSettings);
var result = NetJSON.NetJSON.Deserialize<string>(serialized, netJsonSettings);
// Console output
Console.WriteLine(myString == result); // False (!!! I expected this to be true)
Console.WriteLine(serialized); // "MyString"
Console.WriteLine(myString); // MyString
Console.WriteLine(result); // MyString (Now we get the expected result)
Console.ReadLine();
}
Thank you very much.
Hello,
Trying to serialize an string is not working properly as the deserialized string is not equal to the previously serialized string. Please see code below.