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

Adding int to Boolean converter #1387

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

Adding int to Boolean converter #1387

egorikas opened this issue Jul 25, 2017 · 1 comment

Comments

@egorikas
Copy link

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
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 as completed Jul 29, 2017
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