On 01/12/2018 10:10, Marko Rauhamaa wrote:
In my case, I need an explicit terminator marker to know when a JSON
value is complete. For example, if I should read from a socket:
123
[snip]
You're having to invent a transport protocol to encapsulate your data
protocol because you don't othe
Grant Edwards writes:
> This is what "archive" file formats are for. Just use tar, zip, ar,
> cpio, or some other file format designed to store multiple "files" of
> arbitrary data -- there are plenty of "standard" formats to choose
> from and plenty of libraries to deal with them.
Then the data
On 2018-11-30, Marko Rauhamaa wrote:
> Paul Rubin :
>> Maybe someone can convince me I'm misusing JSON but I often want to
>> write out a file containing multiple records, and it's convenient to
>> use JSON to represent the record data.
>>
>> The obvious way to read a JSON doc from a file is with
Marko Rauhamaa writes:
> Chris Angelico :
>
>> On Sat, Dec 1, 2018 at 10:16 PM Marko Rauhamaa wrote:
>>> and the framing format is HTTP. I will need to type something like this:
>>>
>>>POST / HTTP/1.1^M
>>>Host: localhost^M
>>>Content-type: application/json^M
>>>Content-length: 5
Chris Angelico :
> On Sat, Dec 1, 2018 at 10:16 PM Marko Rauhamaa wrote:
>> and the framing format is HTTP. I will need to type something like this:
>>
>>POST / HTTP/1.1^M
>>Host: localhost^M
>>Content-type: application/json^M
>>Content-length: 54^M
>>^M
>>{
>>"msg
On Sat, Dec 1, 2018 at 10:16 PM Marko Rauhamaa wrote:
>
> Chris Angelico :
> > On Sat, Dec 1, 2018 at 9:16 PM Marko Rauhamaa wrote:
> >> The need for the format to be "typable" (and editable) is essential
> >> for ad-hoc manual testing of components. That precludes all framing
> >> formats that w
Chris Angelico :
> On Sat, Dec 1, 2018 at 9:16 PM Marko Rauhamaa wrote:
>> The need for the format to be "typable" (and editable) is essential
>> for ad-hoc manual testing of components. That precludes all framing
>> formats that would necessitate a length prefix. HTTP would be
>> horrible to have
On Sat, Dec 1, 2018 at 9:16 PM Marko Rauhamaa wrote:
>
> Paul Rubin :
>
> > Marko Rauhamaa writes:
> >> Having rejected different options ( >> https://en.wikipedia.org/wiki/JSON_streaming>), I settled with
> >> terminating each JSON value with an ASCII NUL character, which is
> >> illegal in JSON
Paul Rubin :
> Marko Rauhamaa writes:
>> Having rejected different options (> https://en.wikipedia.org/wiki/JSON_streaming>), I settled with
>> terminating each JSON value with an ASCII NUL character, which is
>> illegal in JSON proper.
>
> Thanks, that Wikipedia article is helpful. I'd prefer t
On 30/11/2018 23:40, Marko Rauhamaa wrote:
> Paul Rubin :
>> Maybe someone can convince me I'm misusing JSON but I often want to
>> write out a file containing multiple records, and it's convenient to
>> use JSON to represent the record data.
>>
>> The obvious way to read a JSON doc from a file is
On Sat, Dec 1, 2018 at 9:46 AM Marko Rauhamaa wrote:
>
> Paul Rubin :
> > Maybe someone can convince me I'm misusing JSON but I often want to
> > write out a file containing multiple records, and it's convenient to
> > use JSON to represent the record data.
> >
> > The obvious way to read a JSON d
On 01Dec2018 00:40, Marko Rauhamaa wrote:
Paul Rubin :
Maybe someone can convince me I'm misusing JSON but I often want to
write out a file containing multiple records, and it's convenient to
use JSON to represent the record data.
The obvious way to read a JSON doc from a file is with "json.lo
Paul Rubin :
> Maybe someone can convince me I'm misusing JSON but I often want to
> write out a file containing multiple records, and it's convenient to
> use JSON to represent the record data.
>
> The obvious way to read a JSON doc from a file is with "json.load(f)"
> where f is a file handle. Un
13 matches
Mail list logo