Json has a natural key-value structure. Python has standard parsing libraries to safely do this, without you having to make sure your code is error-free in it's text parsing. Then other tools/functionality can be used to help make sure valid values are used (before they maybe get fed into your program, unnoticed).