Open ethernetdan opened 8 years ago
@ethernetdan This sounds like a very good idea! Few observations:
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "276",
"bestRating": "5",
"worstRating": "1"
}
This also may be an alreadt solved problem (for RDF). If that's the case, building a validator could be easy: use this library to transform JSON-LD into RDF quads and apply RDF based validation!
Feel free to expand, I'm open to suggestions!
@ethernetdan For schema validation, using json-schema. gojsonschema is a library for doing this in Go. You can use it to validate that a JSON-LD record is valid as well as the schemas themselves are valid.
It doesn't appear like there is a way to validate that a piece of conforms to a schema.
I would expect it to behave similarly to this tool and check that the provided schema(s) match the fields used: https://search.google.com/structured-data/testing-tool
Not sure how much work this would be to implement but I'm happy to lend a hand.