https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2016-04-01T11:44:45ZSaxonica Developer CommunitySaxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=60262016-04-01T11:44:45ZMichael Kaymike@saxonica.com
<ul></ul><p>Also applies where an empty map is output within an array.</p> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=60272016-04-01T12:21:46ZDebbie Lockettdebbie@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>Debbie Lockett</i></li></ul> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=60282016-04-01T12:25:10ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>Tests xml-to-json-A014, xml-to-json-A015, xml-to-json-B014, xml-to-json-B015 added to the XSLT 3.0 test suite. Testing both empty arrays and empty maps inside an array.</p> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=60292016-04-01T12:37:57ZDebbie Lockettdebbie@saxonica.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>Fix Committed on Branch</strong> <i>9.7</i> added</li></ul><p>The problem was that JsonReceiver was not setting atStart to false after processing an empty map or array.</p>
<p>Fix made to JsonReceiver.endElement() to set atStart=false unconditionally.</p>
<p>Patch committed on 9.7 and dev branches.</p> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=60302016-04-04T09:45:54ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>Another user has pointed out that the same bug affects maps containing an empty map or array as the value of a pair (which is not the last).</p>
<p>e.g. xml-to-json(json-to-xml({<a href="1%7D">A":{},"B":1})) returns {"A":{}"B</a> --- with a missing comma.</p>
<p>The patch already committed for this bug fixes this issue. Further new tests (xml-to-json-A017, A018, B017, B018) have been added to the XSLT 3.0 test suite.</p> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=62472016-05-12T14:54:50ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Fixed in Maintenance Release</strong> <i>9.7.0.5</i> added</li></ul><p>Bug fix applied in the Saxon 9.7.0.5 maintenance release.</p> Saxon - Bug #2692: Incorrect output from xml-to-json function, for an empty array inside an arrayhttps://saxonica.plan.io/issues/2692?journal_id=62832016-05-12T15:21:44ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>9.7.0.5</i></li></ul>