Branko Čibej wrote on Mon, Jan 14, 2013 at 07:46:16 +0100: > On 14.01.2013 02:16, bre...@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). Daniel