News for hackers. Stuff that matters.
Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by legalcorrection on Thursday July 21, 2022 @11:40AM (#32180701)
So we’ve come full circle and now JSON is just XML with lighter syntax.
Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by alphalima on Thursday July 21, 2022 @12:10PM (#32181115)
I don't view that as a loss. JSON by itself is just a string with no context information so either the context is in the programmer's head, in a human-readable document, or in a schema file.

Adding a schema to it seems natural to me (as someone who prefers strong-typing), and the JSONSchema implementation seems pretty lightweight and sensible.

I'd go even further down the mining XML's legacy route and add better XPATH2.0 + XQuery - style support. XQuery was a great tool, so expressive. Though it did spawn XQueryX [1] which I'm still unsure whether it was a joke or not.

[1] https://www.oreilly.com/library/view/xquery/0596006349/ch22s...

Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by michelpp on Thursday July 21, 2022 @01:31PM (#32182239)
Postgres does support jsonpath syntax which covers some of those cases:

https://www.postgresql.org/docs/current/datatype-json.html#D...

Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by legalcorrection on Thursday July 21, 2022 @03:15PM (#32183588)
It’s funny to think about where we’d be if someone had come up with a better xml syntax before json took off.
Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by yakubin on Thursday July 21, 2022 @11:52AM (#32180861)
With the difference that it's not a markup language, and it doesn't have those pesky namespaces.
Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by drewda on Thursday July 21, 2022 @11:48AM (#32180810)
To a certain degree, yes. Agreed that it's funny and ironic. But also from an overall software-engineering and developer-experience perspective, this isn't the worst outcome...
Re:Show HN: Pg_jsonschema – A Postgres extension for JSON va... by dragonwriter on Thursday July 21, 2022 @12:14PM (#32181163)
Nah, we still don't have JSL (either JSLT or JSL:FO.) And, given that JSON isn't markup, I don't see that as being likely, at least not JSL:FO.