Feature #4806
closedTransforming JSON input
100%
Description
I propose to implement a -json
option on the command line, as recently done for the Java product; this allows the principal input of the transformation to be JSON rather than XML.
To achieve this I propose to extend the SaxonJS.transform()
API so that the options sourceLocation
, sourceFileName
, and sourceText
can be JSON rather than XML; to indicate this we add another option sourceMediaType
whose values can be application/xml
or applicationi/jsonfor JSON, defaulting to
application/xml`.
Note: it appears that the SaxonJS.transform()
API supports a globalContextItem
option that is missing from the documentation.
Updated by Michael Kay about 4 years ago
- Tracker changed from Bug to Feature
- Category set to Command line
- Priority changed from Low to Normal
- Applies to JS Branch Trunk added
- Fix Committed on JS Branch Trunk added
This feature is now implemented.
The command line now accepts a -json:filename argument as an alternative to the -s argument.
The transform()
API (both sync and async versions) treat sourceFileName
, sourceLocation
, or sourceText
as JSON if the sourceType:"json" option is specified.
Updated by Debbie Lockett almost 4 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
Trunk) - Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
Trunk)
Updated by Debbie Lockett almost 4 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page