Adding more detail to JSON.parse() error

Fix #391