json icon indicating copy to clipboard operation
json copied to clipboard

handle Nullable Types

Open vletoux opened this issue 3 years ago • 1 comments

The parser is not compatible with nullable types (int? for example)

It can be done by adding:

            if (Nullable.GetUnderlyingType(type) != null)
            {
                return ParseValue(Nullable.GetUnderlyingType(type), json);
            }

to https://github.com/zanders3/json/blob/master/src/JSONParser.cs#L251-L252

vletoux avatar Mar 22 '22 14:03 vletoux

I did also a bunch of changes for this. Sorry about the "whole file" diff, maybe it was caused by line breaks: https://github.com/topeterk/SystemTrayMenu/commit/1d29fea766828304f5c4cd385197c75a3a868c22 However, maybe just download the (latest) version and compare it with yours to better see the actual changes.

topeterk avatar May 05 '24 22:05 topeterk