Sentinel json.unmarshall error

Is there a recommended way to handle an error when calling json.unmarshall method?

For example, if I have a JSON file with invalid syntax the “unmarshall” method returns a message similar to the following:

invalid character ‘}’ looking for beginning of object key string

Have you looked into using the json.valid(obj) function? If not, it should help with graceful handling of the malformed json.