From XML Schema to JSON Schema: Translation with CHR
Abstract
Despite its rising popularity as data format especially for web services, the software ecosystem around the JavaScript Object Notation (JSON) is not as widely distributed as that of XML. For both data formats there exist schema languages to specify the structure of instance documents, but there is currently no opportunity to translate already existing XML Schema documents into equivalent JSON Schemas. In this paper we introduce an implementation of a language translator. It takes an XML Schema and creates its equivalent JSON Schema document. Our approach is based on Prolog and CHR. By unfolding the XML Schema document into CHR constraints, it is possible to specify the concrete translation rules in a declarative way.
- Publication:
-
arXiv e-prints
- Pub Date:
- June 2014
- DOI:
- 10.48550/arXiv.1406.2125
- arXiv:
- arXiv:1406.2125
- Bibcode:
- 2014arXiv1406.2125N
- Keywords:
-
- Computer Science - Databases;
- Computer Science - Programming Languages
- E-Print:
- Part of CHR 2014 proceedings (arXiv:1406.1510)