top | item 28479691

(no title)

jonny383 | 4 years ago

If someone tried to push this on my engineering team, they would be laughed out of my office and ridiculed for the idiocy of even suggesting such garbage.

The best factor of JSON is being a schema-less, human readable format. Imagine having someone present this monstrosity to you with a straight face, thinking it's a good use for JSON.

discuss

order

endisneigh|4 years ago

You’d laugh at someone for merely suggesting a technology? Seems like a toxic team

If you think it’s bad surely an explanation would win them over and stop their efforts?

sorokod|4 years ago

Would a library that validates conformance to the schema so that you don't have to handcraft error handling sweeten the proposition?

chiph|4 years ago

That depends on if you're getting JSON data from someone you don't quite trust. For internal uses, sure. If a process sends you bad JSON you go talk to the team responsible.

But if someone outside your organization is sending you data (product orders, say) you want something like this to ensure it's well-formed before you start evaluating business logic & validation against it.

Jenk|4 years ago

Do you prohibit the use of VSCode in your workplace? Anyone using that is using jsonschema. It's built into the applicatoin for its settings and configuration files. Plugins and extensions use it to manage their own config _and_ as validation for the editor's api.

vultour|4 years ago

Your editor has nothing to do with your product. People use PyCharm to write Python yet would "laugh out" anyone who suggests to start writing Java.

ironman1478|4 years ago

So you don't sanitize JSON input to your system? That's what this tool is for. The alternative is writing custom code to validate it, which is just as messy and worse, bespoke.