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

Adding int to Boolean converter #1387

Closed
egorikas opened this Issue Jul 25, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@egorikas
Copy link

egorikas commented Jul 25, 2017

Hi! Great library!
I am using Newtonsoft.Json for a long time and I want to offer a new type of converter.
Often third-party api returns not false or true, but 1 or 0, so I face off a problem with parsing int to bool.
I tend to think, that this is not my problem.

So, my suggestion is about adding BooleanConverter,

Will PR be welcomed?

@JamesNK

This comment has been minimized.

Copy link
Owner

JamesNK commented Jul 29, 2017

I would prefer additional JsonConverters that don't need to be part of the core library were in separate NuGet packages. Keeping Json.NET to a reasonable size is important.

There is nothing stopping you shipping a boolean converter in your own NuGet package.

@JamesNK JamesNK closed this Jul 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment