Closed axeltomasson closed 10 months ago
it would be better if the json format and the rules for converting XML to JSON are in a separate document?
There are a lot of existing XML objects and extensions available already. Having rules for how to convert XML to JSON and not just stick with some examples would be something i prefer. Otherwise there might quickly exist a lot of incompatible implementations?
it would be better if the json format and the rules for converting XML to JSON are in a separate document?
I don't know if separate document makes any difference since it would need to exist from day one? Pretty sure our resellers that have reached out to us wanting a more modern API wanted a JSON REST API. Some are not very fond of XML nor long lived TLS connections.
There are a lot of existing XML objects and extensions available already. Having rules for how to convert XML to JSON and not just stick with some examples would be something i prefer. Otherwise there might quickly exist a lot of incompatible implementations?
Yeah I agree I think rules (or code) how to convert are better then examples. Although we would always document examples outwards for our implementation to help resellers get up and running.
I don't know if separate document makes any difference since it would need to exist from day one? Pretty sure our resellers that have reached out to us wanting a more modern API wanted a JSON REST API. Some are not very fond of XML nor long lived TLS connections.
agree, it would be nice to have the json format available at the same time as the api is ready. but it is better to decouple the representation formats and rules from the actual api. similar as how the EPP RFCs use different documents for describing objects suchs as domains,hosts and contacts
this way we can more easily add additional formats later, e.g. YAML without having to modify this api document.
Yeah I agree I think rules (or code) how to convert are better then examples. Although we would always document examples outwards for our implementation to help resellers get up and running.
I will create a new repository for a 2nd draft document describing the format rules for JSON. we can also add json examples in this new document
i create a new repository for a document about howto add support for JSON. see: https://github.com/SIDN/ietf-epp-restful-json
would you like to become a co-author?
We are looking into running the xsd's from the main rfc's through jgexml
to get a json schema that can be used in an openapi spec. Maybe it will be usable with minor manual changes?
working on simple rules for transforming xml to json in repo below. having a json schema would be nice
for questions and contributions, please see this repo: https://github.com/SIDN/ietf-epp-restful-json
closing this issue now.
The document currently says "MUST support other content-types e.g.: application/epp+json" and to stop every implementation creating their own content-type: application/myTLD+json.
Will it be documented how the xml should be translated to json? That of course has the drawback of being more tied to the xml structure but behind the scenes the code can still validate against the xsd. Or just lots of data examples along side the xml examples with the freedom of implementing all new response json structure? Like other implementations currently in prod have done?
For example our proof of concept implementation (PHP) currently translates the xml automatically to mostly human readable json using some simple rules.