JSONA – From JSON to Annotations and Back: A Generative Software Development Perspective
摘要
JSON has not only become a de factor language for data exchange between distributed systems but commonly been used as the intermediate configuration format in those systems. On the other hand, annotations have extensively been used as the intermediate metadata sublanguage of object-oriented programming languages in various generative software development (GSD) scenarios. However, existing works have not formally addressed the mapping between JSON and annotations and how such mapping is used in GSD. In this paper, we bridge this gap by matching JSON and annotations and formalising the resulted mapping in terms of a set of primitive transformation operators between the two languages. We use UML/OCL to construct syntax models of the two languages and match these models to identify mapping rules. We also semi-formalise design specifications of the operators. We demonstrate the effectiveness of JSONA using two GSD case studies: (1) SPA generation and (2) design pattern application.