etcaetera icon indicating copy to clipboard operation
etcaetera copied to clipboard

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

Open stabacco opened this issue 8 years ago • 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?

stabacco avatar Nov 27 '17 05:11 stabacco