json5 / json5-spec

The JSON5 Data Interchange Format
https://spec.json5.org
MIT License
49 stars 11 forks source link

Import #7

Closed nilesuan closed 4 years ago

nilesuan commented 6 years ago

Because JSON5 can bloat very easily, it would be great if we can import other json5 files into the main one and merge all the data together. Hence configuration of a stack can be modular and not one big chunk of json file.

jordanbtucker commented 5 years ago

Sorry for taking so long to reply to this, but I have been thinking about it. At first glance, this seems like a really nice feature, but I do have some concerns.

There are probably many more concerns that I can't think of yet.

I'm not saying we shouldn't implement this feature. But as you can see, there is a lot to discuss first.

mindplay-dk commented 4 years ago

My first concern would be, how would this even work when the document is being fetched from a web-server? Or worse, over web-sockets, where there isn't even any concept of paths?

In my opinion, this feature would be quite a radical departure from JSON, being a self-contained data file format - and over an HTTP connection, it would likely raise all sorts of questions about caching and security as well. These aren't simple problems.

I think this is more complexity than a JSON-successor should take on?