Actions
Bug #2480
closedparse-json(...\u...)
Start date:
2015-10-21
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:
Description
In Saxon-EE 9.6.0.7-J, the following query…
parse-json('"\u0041"')
yields an exception:
java.util.EmptyStackException
at java.util.Stack.peek(Unknown Source)
at com.saxonica.functions.json.JsonHandlerMap.writeItem(JsonHandlerMap.java:111)
at com.saxonica.functions.json.JsonHandlerMap.writeString(JsonHandlerMap.java:140)
at com.saxonica.functions.json.JsonParser.parseConstruct(JsonParser.java:231)
at com.saxonica.functions.json.JsonParser.parse(JsonParser.java:81)
at com.saxonica.functions.json.ParseJsonFn.eval(ParseJsonFn.java:37)
at com.saxonica.functions.json.JsonToXMLFn.call(JsonToXMLFn.java:68)
at EE_main_01477523312.process(file:/......./x.xq:1)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:66)
at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:409)
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:368)
at net.sf.saxon.Query.runQuery(Query.java:892)
at net.sf.saxon.Query.doQuery(Query.java:439)
at net.sf.saxon.Query.main(Query.java:111)
Updated by Michael Kay about 9 years ago
- Category set to XPath conformance
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Found in version set to 9.6
The 9.6 version of parse-json() was designed only to handle a map or array as the top-level JSON construct. I'm patching the code so it produces sensible diagnostics if this isn't the case. The 9.7 version handles singleton items such as strings or numbers at the top level.
Updated by O'Neil Delpratt almost 9 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.8
Bug fix applied in the Saxon 9.6.0.8 maintenance release
Updated by O'Neil Delpratt almost 9 years ago
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.8 added
Please register to edit this issue
Actions