chevah/utils — pull request #21 by adiroiban (2013-07-27 05:08:24+00:00)
Title: [#1561] Add native default values and support for JSON.

Problem description
===================

The native Python INI configuration file, requires all default values to be passes as string.

This makes it hard to use the default values, outside of INI config file initialization.

Changes description
===================

FileConfiguration was updated to accept default values in native Python data and native data is converted to string inside FileConfiguration initialization.

------

As a side task of this branch, I have added support for storing JSON data in INI files :)

I am not sure if this will create an ugly or cute monster.

I went for INI format since it is permissive (forgive edit errors), easy to read, support comments and multi line string.

INI format is super nice for primitive data, but when you start to need lists... you will have to encoded that list as a string.

I don't want to reinvent the wheel and create another standard for serialization.
JSON seems like the simple way of encoding data, this is why I added JSON as a data type for INI file options.

How to try and test the changes
===============================

reviewers @alibotean @bnickname

Check that changes make sense.

Thanks!