Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50795

Re: [ANN]:JSONStream

From "Clark C. Evans" <cce@clarkevans.com>
References <CACGSewf0J3SPNssM-iJPg1Rthj+_wJe1p-fGe4_FcgxHGiJu0A@mail.gmail.com>
Subject Re: [ANN]:JSONStream
Date 2013-07-17 11:51 -0400
Newsgroups comp.lang.python
Message-ID <mailman.4804.1374076304.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Looks interesting.  In YAML we used three dashes as the "stream
separator".

So already a YAML processor could handle a JSON stream ...



>>> for doc in yaml.load_all("""

... --- {"one": "value"}

... --- {"two": "another"}

... ---

... {"three": "a third item in the stream",

...  "with": "more data"}

... """):

...     print doc

...

{'one': 'value'}

{'two': 'another'}

{'with': 'more data', 'three': 'a third item in the stream'}

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [ANN]:JSONStream "Clark C. Evans" <cce@clarkevans.com> - 2013-07-17 11:51 -0400

csiph-web