|
|
|
|
|
by Groxx
955 days ago
|
|
Why couldn't they? Schemas can allow you to have that as part of your schema. E.g. JSON Schema lets you define max and min lengths on variable-sized things. You can avoid all dynamic resizing if you're careful enough. I'll definitely agree that most things won't fully take advantage of that even if you provide that information, but it is definitely possible to do so. |
|
That said, JSON is designed for human readability above performance, so it's a design concession that makes sense. What doesn't make sense is using JSON anywhere performance matters.