M
moogyd
Hi,
I need to define some configuration in a file that will be manually created.
Internally, the data will be stored as a dict, which contains various properties related to a design
e.g. Design Name, dependencies, lists of files (and associated libraries).
json seemed a quick an easy way of achieving this
Anyway, in simple terms my question - if I know everything is a string, how can I omit the quotation marks?
i.e. I can do
But I would like to do
The problem is that I don't want to make users have to type redundant characters.
Is it possible?
Thanks,
Steven
I need to define some configuration in a file that will be manually created.
Internally, the data will be stored as a dict, which contains various properties related to a design
e.g. Design Name, dependencies, lists of files (and associated libraries).
json seemed a quick an easy way of achieving this
Anyway, in simple terms my question - if I know everything is a string, how can I omit the quotation marks?
i.e. I can do
{u'mykey': [u'data0', u'data1']}json.loads('{"mykey":["data0", "data1"]}')
But I would like to do
Traceback (most recent call last):json.loads('{mykey:[data0, data1]}')
The problem is that I don't want to make users have to type redundant characters.
Is it possible?
Thanks,
Steven