Hi! I like the idea of a js-native encoding, but the linked source seems not to be a representation but a construction-library. So I'd suggest to rather go a more plain but ugly way representing the whole tree as a tree of OM-POJSOs using some meta-keys to represent the "missing" xml-features:
{ "_head": "OMI", "_body": "12344" } or { "_head": "OMS", "name": "plus", "cd": "arith1" } for the "proper" xml-attributes. The advantage of this is that it's a generic structure that can be parsed without any knowledge about semantics and without any libraries and 100% isomorphic to the XML. { "_head": "OMA", "_body": [ { "_head": "OMS", "name": "plus", "cd": "arith1" }, { "_head": "OMI", "_body": "1" }, { "_head": "OMI", "_body": "2" } ] } Nonetheless, integrating into the "OpenMath.js" reasonable and the existing work can be used. Just my 5ct, - Peter > On 2. May 2018, at 08:57, Michael Kohlhase <michael.kohlh...@fau.de> wrote: > > Dear all, > > we have come across the need to communicate OpenMath Objects to JavaScript. > > We could go traditional and send over XML and have JS parse that into JS > Objects, or we could use a JSON binding for OpenMath. > > It actually seems that Nathan Carter has already done something very > much like that. [1] > > Would it make sense to standardize a JSON binding of OpenMath? After > all, JSON is one of the practical competitors for XML and used A LOT on > the web. > > Michael > > [1] https://lurchmath.github.io/openmath-js/site/ > > > -- > ---------------------------------------------------------------------- > Prof. Dr. Michael Kohlhase, http://kwarc.info/kohlhase, skype: mibein42 > > Professur für Wissensrepräsentation & -verarbeitung > Informatik, FAU Erlangen Nürnberg, Martensstr. 3, D-91058 Erlangen, Room > 11.139, > tel/fax: (49) 9131-85-64052/55, michael.kohlh...@fau.de > ---------------------------------------------------------------------- > > > _______________________________________________ > Om mailing list > Om@openmath.org > http://mailman.openmath.org/cgi-bin/mailman/listinfo/om _______________________________________________ Om mailing list Om@openmath.org http://mailman.openmath.org/cgi-bin/mailman/listinfo/om