index.js
function parseAndAutoValidate(json) {
  try {
    const obj = JSON.parse(json);
    return autoValidate(obj);
  } catch (error) {
    return { isValid: false, error: error };
  }
}
function parseAndAutoValidate(json) {
  try {
    const obj = JSON.parse(json);
    return autoValidate(obj);
  } catch (error) {
    return { isValid: false, error: error };
  }
}
function parseAndAutoValidate ( json ) { try { const obj = JSON . parse ( json ) ; return autoValidate ( obj ) ; } catch ( error ) { return { isValid : false , error : error } ; } }
Parse and validate JSON, auto-detecting its schema.
Parse and validate JSON auto - detecting its schema .