package json-print: fail if property cannot be found #90

Merged
merged 1 commit into from May 23, 2012

1 participant

@4z3

This commit fixes an issue, where json-print would print undefined thinking it's valid JSON.

Example

$ cat file.json
{
   "foo": {}
}

# old behavior
$ json-print file.json foo bar; echo $?
undefined
0

# new behavior
$ json-print file.json foo bar; echo $?
foo.json: foo.bar is undefined
23
@4z3 4z3 merged commit d1764e5 into mwaylabs:detox May 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment