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

How to test if the value is NULL? #93

Open
jokaorgua opened this issue May 24, 2022 · 1 comment
Open

How to test if the value is NULL? #93

jokaorgua opened this issue May 24, 2022 · 1 comment

Comments

@jokaorgua
Copy link

Hello.

is there any way to test the value for NULL?

Assume we have a json

{"someid":null}

And I want to test if the value is null, not just empty. For testing it as empty I can do something like require.Empty(simplejsonData.Get("someid"))

Any help is appreciated.

@jokaorgua
Copy link
Author

oh. finally found. require.Nil(simplejson.Get("someid").Interface())

Seems to me would be nice to have a special method like simplejson.MustNull()

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

No branches or pull requests

1 participant