From: <tr...@do...> - 2014-10-07 09:16:51
|
<p>A new comment has been added to the following issue.</p> <table border="0"> <tr> <td width="90px" valign="top"><b>Title:</b></td> <td>SparqlJsonParser fails to parse results with mixed ordering of root attributes</td> </tr> <tr> <td><b>Project:</b></td> <td>Core Library (dotNetRDF.dll)</td> </tr> <tr> <td><b>Created By:</b></td> <td>Rob Vesse</td> </tr> <tr> <td><b>Date:</b></td> <td>2014-10-07 10:16 AM</td> </tr> <tr> <td><b>Comment:</b></td> </tr> <tr> <td colspan="2"><p> Just because the specs allow something doesn't mean that it is remotely sensible, IMO the SPARQL Results JSON format is flawed in this regard and should have had the top level object be an array thus guaranteeing that the head appear before the results.</p> <p> Essentially you are asking for the parser to be modified to <strong>allow the</strong> <strong>header to appear at the end of the file</strong>. Perhaps you should also be filing bugs against the systems producing this data? While it may not be invalid according to specification it is much more awkward for other tools to consume and validate efficiently.</p> <p> Fixing this is like most things technically feasible though it will have the unfortunate side effect that depending on how the parser is used and the size of results being received malformed results will either never be detected at all (if your results handler terminates parsing early) or will be detected very late in the parsing process (i.e. when the end of the file is reached).</p> <p> The alternative fix is to implement a completely new parser which is DOM based and thus ordering will be completely irrelevant but then you are trading off low memory usage and streaming parsing for much higher memory usage (and possible OOM on large results) for strict adherence to the specs.</p> <p> I will fix the existing parser to allow the header at the end of the file, however contributions of a DOM based parsing mode will need to come from the community.</p></td> </tr> </table> <p> More information on this issue can be found at <a href="http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=430" target="_blank">http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=430</a></p> <p style="text-align:center;font-size:8pt;padding:5px;"> If you no longer wish to receive notifications, please visit <a href="http://www.dotnetrdf.org/tracker/Account/UserProfile.aspx" target="_blank">your profile</a> and change your notifications options. </p> |