Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle Nullable Types #49

Open
vletoux opened this issue Mar 22, 2022 · 1 comment
Open

handle Nullable Types #49

vletoux opened this issue Mar 22, 2022 · 1 comment

Comments

@vletoux
Copy link

vletoux commented Mar 22, 2022

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

@topeterk
Copy link

topeterk commented May 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants