News for hackers. Stuff that matters.
Re:SVG: The Good, the Bad and the Ugly by com2kid on Friday February 12, 2021 @12:28PM (#26116119)
> JSON Schema is a non-starter. No one ever seems to use it, and I don't think it ever made it out of committee. It pretty much goes against why JSON is popular.

My company heavily uses JSON schema.

The OpenAPI project uses JSON Schemas, and AWS also allows for their usage in places.

And finally, there are a couple good projects that automatically generate JSON Schemas from Typescript definitions, which is my preferred way to go. :)

Re:SVG: The Good, the Bad and the Ugly by ChrisMarshallNY on Friday February 12, 2021 @12:40PM (#26116258)
Re:SVG: The Good, the Bad and the Ugly by com2kid on Friday February 12, 2021 @05:22PM (#26119214)
It's been "draft" for years.

Hasn't stopped tooling from being built around it.

Re:SVG: The Good, the Bad and the Ugly by riedel on Friday February 12, 2021 @03:30PM (#26118194)
Re:SVG: The Good, the Bad and the Ugly by berkes on Saturday February 13, 2021 @04:38AM (#26122530)
Whenever I encounter JSON schema, It makes me aware that the important difference between JSON and XML is not the syntax (my IDE handles that fine), nor the features. But the difference in rigidity. JSON when agility is needed. XML when rigidity is needed.

I fail to see any benefit of a rigid, typed, schema'd JSON that XML does not offer more naturally.

Re:SVG: The Good, the Bad and the Ugly by com2kid on Monday February 15, 2021 @11:46PM (#26151041)
Lots of APIs pop out JSON.

JSON schema let's you make that a bit safer.

Re:SVG: The Good, the Bad and the Ugly by berkes on Tuesday February 16, 2021 @05:24AM (#26152645)
My point is that if they need this "safer", why not pop out XML instead.

The largest benefit of JSON is that is not XML. That it doesn't get bogged down in schema's, strong typing, interfaces, contracts and so on. You loose all that by turning JSON into XML-written-in-a-different-syntax.