[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-03-27 Thread Paul J. Lucas
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
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:
  Fix Released

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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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


[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-01-25 Thread Paul J. Lucas
** Changed in: zorba
   Status: New => Fix Committed

-- 
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:
  Fix Committed

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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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


[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-01-23 Thread Chris Hillery
The JSON grammar is not as pedantic as I would like, but it looks like a
JSON text must be exactly an object or an array.

  http://tools.ietf.org/html/rfc4627

So an empty string is not a valid instance of JSON.

-- 
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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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


[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-01-23 Thread Paul J. Lucas
What specification tells you that parsing an empty value should return an error?
Why isn't returning nothing valid?

-- 
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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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


[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-01-23 Thread Paul J. Lucas
These functions are declared as taking an xs:string? as an argument. If
one is able to pass something like  (which is not a string), then it
points to a bug elsewhere in the code, i.e., something should have
checked that the actual argument type doesn't match the declared
argument type -- right?  If so, that's not my code.

-- 
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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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


[Zorba-coders] [Bug 920721] Re: json 2.0 bug: wrong behavior for parsing empty value

2012-01-23 Thread Paul J. Lucas
Renamed the tests to conform to all the rest, i.e., contain "parse" or
"serialize" in the test name. Also, again, the second test is invalid
XQuery since it's missing a "return".

-- 
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()

  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 :=
http://www.zorba-xquery.com/modules/converters/json-options";>
  

  json:parse(,$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