Open vasekch opened 5 years ago
From python side I totally agree and I would implement this feature.
Yes you are right, @vasekch , but in version 3 you will miss function "in".
Like when I looking for available networks, I asking if I have it in my config by using "ssid in config.networks" that would not work if that will be list and I will need do for in for satement where I have to do much more iterations than now.
or redone this to be effective in embedded too. Maybe you have some fast trick how to achieve this in list of dicts too.
Currently we have two version of
wifi.json
original - single network
latest version 2 - multiple networks
Version 2 is great, but there may be more predictable structure of the json file (and parsed Python object), it's common to have list of dictionaries in such cases and have stable keys across different network settings. using dict ket to store value is a bad practice.
here is proposed version 3
I understand that version 2 is actually more size efficient and is working well, so there is just little benefit of redoing it, but it would be more Pythonic :).