[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1432778 - in /subversion/trunk/tools/server-side/svnpubsub: README.txt commit-hook.py daemonize.py example.conf irkerbridge.py notes/ svnpubsub/client.py svnpubsub/server.py svnwcsub.conf.example svnwcsub.py test.conf testserver.py watcher.py

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 14 Jan 2013 12:02:51 +0200

Branko Čibej wrote on Mon, Jan 14, 2013 at 07:46:16 +0100:
> On 14.01.2013 02:16, breser_at_apache.org wrote:
> > - Each JSON record is separated with a null character.
> Why? If I understand this change, the result will be a not very standard
> stream of nul-terminated JSON objects. While the svnpubsub client will
> parse that, other JSON-consuming tools will need extra work.
> Why not return a proper JSON array instead?

That's what the code was doing originally: return commit records as one
indefinite array. That forced clients to use an iterative parsing
approach, ie, needless complication.

The current approach allows clients to loop on "read one complete json
object" from the stream.

I suppose wrapping each record as a one-element array would serve the
same purpose as the NUL bytes: act as a belt-and-suspenders interrecord
delimiter (apart from the implied one by the matching } to the opening {
of a record).

Received on 2013-01-14 11:03:32 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.