- EXI Study Group (Provisional)
- Serial: Not assigned
- Publication: Note
XSLT for JSON Schema to XSD
This note provides information of potential use to the Web community. It is not a standard, nor is it on the standards track. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
Copyright (C) EXI S.G. (2025). All rights reserved.
This document describes a general mapping of a JSON Schema to an XML Schema Description in the XSL Transformations language for the purpose of leveraging EXI's schema-aware compression for data stored in JSON.
1. Introduction
Efficient Extensible Interchange (EXI) [1] is trivially applicable to encode JSON-serialized data given that a representation of JSON in the XML information set is already described in XPath 3.1 [2].
However, this approach fails to make use of EXI's schema-aware compression, which allows for greater compaction by making use of grammatical information present in an XML schema.
JSON Schema [3] is a standard schema language for JSON. Using the XSL Transformations language [4], a JSON Schema can be transformed into an XSD schema for an equivalent document in the XPath JSON serialization. This generated XSD schema can then be used to inform EXI compression.