oleiade/etcaetera

Allow "Overrides" to patch only certain parts of a dictionary structure.

stabacco opened this issue · 0 comments

i have a json files (comes from an external API so i don't have the option of changing it) that looks like this :

(contents of /tmp/test.json)

{ "level1": { "level2": { "content1": { "one": 1 }, "content2": { "two": 2 } } } }

which i load through

f = File('/tmp/test.json')

Is there a way i can register an Override which would allow me to set
level1.level2.content2.two = 3
and keep the rest of the structure with its original #values?