ralfstx / minimal-json

A fast and small JSON parser and writer for Java
MIT License
732 stars 186 forks source link

Adds JsonObject#contains #87

Closed WalkerKnapp closed 6 years ago

WalkerKnapp commented 6 years ago

I was moving over to this API from Jackson, and couldn't find a method for checking the presence of a member of an object. I know that you can always check if a value is null, but I would love something more concise.

WalkerKnapp commented 6 years ago

Just wondering, is there a reason why this was not originally included while it is in almost every other Json API?

ralfstx commented 6 years ago

Thanks @WalkerKnapp! Looks good to me. I want to keep the API minimal, but this one method is fair enough. Would you mind adding a test or two to JsonObject_Test?

WalkerKnapp commented 6 years ago

Sure! Thank you!

ralfstx commented 6 years ago

Thank you!