Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-12 Thread victor . hooi
On Monday, October 12, 2015 at 10:02:13 PM UTC+11, Laura Creighton wrote: > In a message of Sun, 11 Oct 2015 17:56:33 -0700, Victor Hooi writes: > >Hi, > > > >I'm attempting to parse MongoDB loglines. > > > >The formatting of these loglines could best be described as JSON-like... > > > >For example

Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-12 Thread Laura Creighton
In a message of Sun, 11 Oct 2015 17:56:33 -0700, Victor Hooi writes: >Hi, > >I'm attempting to parse MongoDB loglines. > >The formatting of these loglines could best be described as JSON-like... > >For example - arrays > >Anyhow, say I had the following logline snippet: > >{ Global: { acquireC

Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread Random832
Victor Hooi writes: > My question, is there a more lenient, or relaxed JSON parser available > for Python, that will try to do a best-efforts parsing of non-spec > JSON? In an answer to a similar question on StackExchange, using YAML was suggested. http://stackoverflow.com/questions/9104930 Is

Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread MRAB
On 2015-10-12 01:56, Victor Hooi wrote: Hi, I'm attempting to parse MongoDB loglines. The formatting of these loglines could best be described as JSON-like... For example - arrays Anyhow, say I had the following logline snippet: { Global: { acquireCount: { r: 2, w: 2 } }, Database: { ac

Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread Victor Hooi
Hi, I'm attempting to parse MongoDB loglines. The formatting of these loglines could best be described as JSON-like... For example - arrays Anyhow, say I had the following logline snippet: { Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acq