Indicate input json parse error with better message

Fixes #42
Merge branch 'json-parse'