go-simplejson
go-simplejson copied to clipboard
How to test if the value is NULL?
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.
oh. finally found. require.Nil(simplejson.Get("someid").Interface())
Seems to me would be nice to have a special method like simplejson.MustNull()