Hot answers tagged

6

You can use anything as JSON keys, as long as it is valid UTF-8, doesn't contain zero code points, and it would be useful if you could represent the key as a string in the programming language of your choice. I might recommend not to use different Unicode representations of the same string (for example "Ä" written as one or two code points). Reading some ...


3

There are plenty of JSON serialization systems that are more than capable of handling mapping between field names that aren't suitable for use in the language they integrate with. In most cases, they aren't hard to use, and require only a little bit of extra effort. In an ideal world, you wouldn't have to, but if your API already uses dashes, changing it ...


2

I think two issues to consider are: (and you're referenced this above) - do you need to find child nodes ? In which case you perhaps want to avoid storing sizeable hierarchies and instead store the individual Foos such that they're immediately searchable. That may impact tree construction/retrieval times Do you want to move children between trees? If you ...


1

JSON API is nice, but complex spec. Its implementation is also not easy, especially if you don't have good library implementing it. So it's mostly a question "is it worth it for our use case"? In my opinion, it's worth it if you have large and/or public API which needs to be stable, extensible, will be developed for years. JSON API provides reasonable ...



Only top voted, non community-wiki answers of a minimum length are eligible