Skip to content

ParamTools 0.18.0

Compare
Choose a tag to compare
@hdoupe hdoupe released this 05 Feb 17:21
· 7 commits to master since this release
  • Allow comments in JSON files. (#124)
In [1]: import paramtools                                                           

In [2]: s = """// this is my json file 
   ...: // more comments here 
   ...: /* 
   ...: multi line comments? 
   ...: */ 
   ...: { 
   ...:     "hello": "world", 
   ...:     "allows_urls": "http://double-slash-is-ok.com" 
   ...: }"""                                                                        

In [3]: paramtools.read_json(s)                                                     
Out[3]: 
OrderedDict([('hello', 'world'),
             ('allows_urls', 'http://double-slash-is-ok.com')])