Open everix1992 opened 1 year ago
After some further testing, I assume this is happening because the overloaded ToString() returns the JSON string (either indented or not), while the base ToString() with no arguments actually converts to a string with Microsoft's type converters (which outputs "True" for a value of true). I assume this can be closed out as a non-issue
Then the documentation should be updated since it states that tostring returns JSON.
There is a remark bout this violation of Liskov substitution principle is documented as a remark but the online docs don't reflect that.
Source/destination JSON
Expected behavior
JToken.ToString() returns the string "true"
Actual behavior
The string "True" is returned (note the capital T)
Steps to reproduce
Other Notes
Tested this against the latest published version of the library (13.0.1) on a .NET 6 Console App. It seems to me like we'd expected the basic ToString() method to return exactly what is in the JSON, which is "true". Not sure why it's getting capitalized or why it doesn't match up with the other overloads.