3 ms·
JSON is best when it's solely used for serialization (or config files). Using it deep into the project makes no sense, the first step in handling JSON should a
by tscs37 10y ago
JSON is best when it's solely used for serialization (or config files).
Using it deep into the project makes no sense, the first step in handling JSON should always be to code it into native data structures.
- jack9 10y agoFirst step is validation, then conversion, then logic. This keeps the json structure errors and changes from affecting the business logic.
- deleted 10y ago[deleted]
- rocqua 10y agoThe point made here seems to be that often, these native data structures are dicts and lists, because that is JSON. Meanwhile, you'd often want something else when looking at only the internals.