PFython / cleverdict

A JSON-friendly data structure which allows both object attributes and dictionary keys and values to be used simultaneously and interchangeably.
MIT License
102 stars 9 forks source link

Instantiate from more sources #12

Open PFython opened 3 years ago

PFython commented 3 years ago

Enable:

CleverDict({"1": "one"}') E.g. look for string in init and attempt to convert using json.loads

CleverDict(file) Where file is INI, YAML, TOML, JSON or .py with e.g. variable = value lines

PFython commented 3 years ago

JSON and line-delimeted ("\n") strings and files now supported in Version 1.8.0.

Labelled as "wontfix" after Version 1.8.0 simply because the main authors don't currently have the time for non essential enhancements. If there's a huge uptake in people using CleverDict and asking for this feature that may change, or if you're reading this why not Fork, develop a solution, and contribute a Pull Request yourself?