Skip to content

Releases: carlosescri/DottedDict

Better JSON handling.

30 Oct 10:15
Compare
Choose a tag to compare

DottedCollection.load_json() now expects valid JSON and doesn't mask any error.

Validations when instantiating DottedDict

30 Oct 09:39
Compare
Choose a tag to compare

Now you can't instantiate a dotted collection with an object that contains non-escaped dictionary keys with dots.

Add slicing to dotted

21 Aug 09:42
Compare
Choose a tag to compare

Can use escaped dots for keys. Bugfixes.

20 Jul 11:56
Compare
Choose a tag to compare
Allow keys with dots

Signed-off-by: Carlos Escribano <[email protected]>

Better tests & bugfixes

19 Jan 18:43
Compare
Choose a tag to compare

Fixed small bug

24 Nov 11:25
Compare
Choose a tag to compare

When trying to load a leaf value (a string) recursively you got a ValueError. This release fixes it.

Suppose you have an obj variable that is an instance of DottedCollection and a set of config paths and values in a settings collection:

for setting in settings.all():
  obj[setting.parameter] = DottedCollection.load_json(setting.value)

That would fail if setting.value is an instance of basestring.

But if you do:

obj['source.body'] = DottedCollection.load_json("something")
obj['source.body.more'] = DottedCollection.load_json('{"something": "more"}')

you will get an error because obj['source.body'] is actually an instance of basestring.