[BangPypers] JSON PARSER
lokeshbobbys at yahoo.com
Fri Mar 21 10:29:11 CET 2014
Ideally speaking a JSON shouldn't be created with repetitive key names. But manually it is possible that a proper JSON file can be appended with a duplicate key. We need to catch that duplicate key. If we are going to use json.load(), the repetitive keys of the JSON file wont get loaded. Only the last occurrence of the key will be there in that loaded data.
Instead I want that entire data in JSON file should be loaded. Hoping that you got the point what I want :-)
On Friday, 21 March 2014 2:45 PM, Jayanth Koushik <jnkoushik at gmail.com> wrote:
The 'problem' that you talk about isn't really a problem. Since the JSON specification does not say what is to be done for repeated names, it is up to the implementation to decide. What is your requirement for handling repeated names?
On Fri, Mar 21, 2014 at 2:30 PM, lokesh bobby <lokeshbobbys at yahoo.com> wrote:
>Thanks for your reply. I am not looking for loading the JSON file. There is a limitation in it. Go thru the links
>In order to get rid of that problem, I am looking for some JSON stream parsers.
>On Friday, 21 March 2014 2:09 PM, Noufal Ibrahim KV <noufal at nibrahim.net.in> wrote:
>On Fri, Mar 21 2014, lokesh bobby wrote:
>> Hi ALL,
>> Can you share your thoughts on how to parse a JSON file by using
>with open("data.json") as f:
>BangPypers mailing list
>BangPypers at python.org
More information about the BangPypers