Geonovum / uml2json

Best Practise for OGC - UML to JSON Encoding Rules
https://geonovum.github.io/uml2json/document.html
0 stars 1 forks source link

7.3.3.9 - pja - Why json prefix for jsonFormat and jsonPattern? #21

Closed PalmJanssen closed 1 year ago

PalmJanssen commented 1 year ago

The TV's jsonPattern and _jsonFormat_both have the json prefix. Is that really needed? I would expect the pattern and format be equal in any implementation. Or do we foresee ldPattern, gmlPattern etc?

jechterhoff commented 1 year ago

Re jsonPattern: We did that since different implementation technologies may support different regular expression dialects. With the json prefix, we ensure that the pattern value is used specifically written for use in JSON Schema. If we come across other implementation technologies that have their own regex dialect, then the definition of specific xyzPattern tags may be justified. Of course, there may be precedent for a plain pattern tag, as is the case in ShapeChange for the XSD encoding. There may even be a non regex-related use of "pattern" in a certain implementation technology. That would be another reason to define a xyzPattern tag (i.e., with technology specific prefix).

Re jsonFormat: Here the use is definitely restricted to JSON Schema, since the values of the tag shall be JSON Schema keywords.