structured-data-testing-tool icon indicating copy to clipboard operation
structured-data-testing-tool copied to clipboard

Testing tool skips invalid JSON should report as a failure

Open dougnukem opened this issue 5 years ago • 1 comments

Describe the bug sdtt does not report invalid JSON syntax errors as a failure and skips those JSON-LD blocks.

$ sdtt --url https://supplydrop.com
Error in jsonld parse - SyntaxError: Unexpected end of JSON input
Tests

  Schema.org > FAQPage - 100% (1 passed, 0 failed)
    ✓  schema in jsonld

Statistics

  Number of Metatags: 19
  Schemas in JSON-LD: 1
     Schemas in HTML: 0
      Schema in RDFa: 0
  Schema.org schemas: FAQPage
       Other schemas: 0
     Test groups run: 2
  Optional tests run: 44
 Pass/Fail tests run: 1

Results

    Passed: 1 	(100%)
  Warnings: 0 	(0%)
    Failed: 0 	(0%)

  ✓ 1 tests passed with 0 warnings.

The google validator reports that as an error: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fsupplydrop.com

Missing ',' or '}' in object declaration.

dougnukem avatar Jun 11 '20 14:06 dougnukem

Thanks! I agree, that is something that should improved by communicating more clearly.

I'm going to re-classify as an enhancement in this case, so that other things that are more obviously defects (rather than sins of omission) can be prioritised.

iaincollins avatar Jun 11 '20 23:06 iaincollins