Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88362
| From | dieter <dieter@handshake.de> |
|---|---|
| Subject | Re: Python JSON processing - extra data error |
| Date | 2015-03-31 08:05 +0200 |
| References | <ba7c8df2-938b-4283-9aac-1ad32863521d@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.358.1427781935.10327.python-list@python.org> (permalink) |
karthik.sharma@gmail.com writes: > I have the following python program to read a set of JSON files do some processing on it and dump them back to the same folder. However When I run the below program and then try to see the output of the JSON file using > > `cat file.json | python -m json.tool` > > I get the following error > > `extra data: line 1 column 307 - line 1 column 852 (char 306 - 851)` You might have got a traceback which would tell you where precisely the problem was detected. Looking the the code there (Python is "Open Source"; thus, you can look at code) will tell you what apparently went wrong. "extra data" suggests to me that your JSON input may be invalid. "1 2", for example could cause such a problem, because it contains two integers (not a single one) without a containing container.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python JSON processing - extra data error karthik.sharma@gmail.com - 2015-03-30 14:12 -0700 Re: Python JSON processing - extra data error dieter <dieter@handshake.de> - 2015-03-31 08:05 +0200
csiph-web