Project

Profile

Help

Feature #4952

Add support for a JSON Source

Added by Norm Tovey-Walsh about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-03-30
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:

Description

From a discussion on the xml.com Slack, it looks like there would be value in providing some mechanism for loading JSON documents as a transformation source at the API level.

https://xmlcom.slack.com/archives/C011NLXE4DU/p1617028570195500

History

#1 Updated by Michael Kay about 1 month ago

Saxon 11 adds

XdmValue json = Processor.newJsonBuilder().parseJson(Reader|String);
Xslt30Transformer.setContextItem((XdmItem)json);

It's an XdmValue rather than an XdmItem because the Json input "null" delivers an Xdm empty sequence, which is a bit unfortunate.

#2 Updated by Michael Kay about 1 month ago

  • Tracker changed from Bug to Feature
  • Status changed from New to Resolved

Please register to edit this issue

Also available in: Atom PDF