Validate JSON, better errors for invalids. Fixes #14