5 ms·
> Why do so many tools have JSON config files‽ 1: Because JSON is a very easy serialization format to work with. I suspect these tools all have configuration c
by gwbas1c 14d ago
> Why do so many tools have JSON config files‽
1: Because JSON is a very easy serialization format to work with. I suspect these tools all have configuration classes / objects that are deserialized straight from the config file.
2: I suspect a lot of these tools are written in Javascript, and in Javascript JSON is very easy to work with.
- happymellon 14d agoJSON is probably the easiest format to work with regardless of language.
- bluGill 14d agoMostly because it is so common (web) it doesn't matter what language you use there is a good maintained tool to read and write JSON.
- gwbas1c 14d agoPedantic response: In C#, I find "binary serialization" much easier to program with than JSON. Then again, the resulting blobs require specialized tooling to read, and they're very hard to work with in other programming languages. --- But, jokes aside: I find CSV is great for "rows" because it doesn't repeat field names for every object. I really like XML when each tag is an object, and fields are attributes. Most people don't understand this and end up making a hug mess; and some serializers do this by default too. IMO, this is why JSON became much more popular.