Public bug reported:

Parsing an empty value has wrong behavior for both JSON mappings (Snelson and 
JSON-ML).
Please see failing tests:
- test/rbkt/zorba/json/json-snelson-empty-value
- test/rbkt/zorba/json/json-jsonml-empty-value

For instance in zorba/json/json-snelson-empty-value.xq:

import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
json:parse(<a/>)

Should raise error(s) http://www.zorba-xquery.com/errors:ZJPE0001
But instead Zorba returns a result.


For test/rbkt/zorba/json/json-jsonml-empty-value.xq:

import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
let $options :=
  <options xmlns="http://www.zorba-xquery.com/modules/converters/json-options";>
    <json-format value="JsonML-array"/>
  </options>
json:parse(<a/>,$options)

Zorba returns http://www.w3.org/2005/xqt-errors:XPST0003
instead of http://www.zorba-xquery.com/errors:ZJPE0001

** Affects: zorba
     Importance: Medium
     Assignee: Paul J. Lucas (paul-lucas)
         Status: New

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/920721

Title:
  json 2.0 bug: wrong behavior for parsing empty value

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Parsing an empty value has wrong behavior for both JSON mappings (Snelson and 
JSON-ML).
  Please see failing tests:
  - test/rbkt/zorba/json/json-snelson-empty-value
  - test/rbkt/zorba/json/json-jsonml-empty-value

  For instance in zorba/json/json-snelson-empty-value.xq:

  import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
  json:parse(<a/>)

  Should raise error(s) http://www.zorba-xquery.com/errors:ZJPE0001
  But instead Zorba returns a result.

  
  For test/rbkt/zorba/json/json-jsonml-empty-value.xq:

  import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
  let $options :=
    <options 
xmlns="http://www.zorba-xquery.com/modules/converters/json-options";>
      <json-format value="JsonML-array"/>
    </options>
  json:parse(<a/>,$options)

  Zorba returns http://www.w3.org/2005/xqt-errors:XPST0003
  instead of http://www.zorba-xquery.com/errors:ZJPE0001

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/920721/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to