Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid child node exception when comparing JSON arrays or objects. #58

Open
rhdunn opened this issue Jun 18, 2021 · 0 comments
Open

Invalid child node exception when comparing JSON arrays or objects. #58

rhdunn opened this issue Jun 18, 2021 · 0 comments

Comments

@rhdunn
Copy link

rhdunn commented Jun 18, 2021

Given:

declare %test:case function compare-2-json-array()
{
  let $actual := array-node { 1, 2, 3 }
  let $expected := array-node { 1, 3, 5 }
  return assert:equal($actual, $expected)
};

I get an XDMP-CHILDNODEKIND "Invalid child node kind" error in src/xray.xqy when it is trying to add the array-node to the XML output.

A fix for this -- and making the JSON output work better when the expected/actual values are XML, would be something like:

    element actual { xdmp:quote($actual) },
    element expected { xdmp:quote($expected) },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant