hasOwnProperty
Go's JSON package does not provide a way to distinguish between null
keys and keys which do not exist on a structure. This package provides such functionality.
const json = []byte(`{"hello": {"world": true}}`)
ok := hasOwnProperty.Test(json, "hello") // true
ok = hasOwnProperty.Test(json, "hello.world") // true
ok = hasOwnProperty.Test(json, "goodbye") // false