Popis: |
The data exchange efficiency of traditional XML is low and its versatility is poor, while JSON has a higher transmission efficiency compared with XML. As a lightweight data-interchange format, JSON is becoming more and more popular, but not as common as XML for its latter appearance in the application of web services. If we directly translate the XML data format into JSON data format, the original data will have format error. Since there is XML Schema Documents to validate XML format, and the JSON Schema to validate the JSON format. We can translate the XSD to its corresponding JSON Schema to make sure the translation from XML to JSON with no format error. So far, there is no much research on the translation from XSD into JSON Schema. In this paper we made a dictionary to translate every node of XSD to its equivalent JSON Schema format by unfolding the XSD. With some tests, we find the method can basically have a good translation result. |