<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
Hi, everyone.
<div class=""><br class="">
</div>
<div class="">I'm the author of the JS OpenMath module referred to below.  I was definitely
<i class="">not</i> trying to create a standard encoding when writing that module, but rather just creating a library useful for my own purposes.  If a standard encoding were created, I would be glad to be a part of the efforts, and to update that module to
 read/write the standard encoding.</div>
<div class=""><br class="">
</div>
<div class="">My experience lies more in building software than it does in building standards, but I'm still glad to contribute to the degree that I can.</div>
<div class=""><br class="">
</div>
<div class="">Nathan<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On May 2, 2018, at 3:52 AM, Alberto González Palomo <<a href="mailto:alberto@matracas.org" class="">alberto@matracas.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Michael Kohlhase wrote on 02/05/18 at 08:57:<br class="">
<blockquote type="cite" class="">we have come across the need to communicate OpenMath Objects to JavaScript.<br class="">
We could go traditional and send over XML and have JS parse that into JS<br class="">
Objects, or we could use a JSON binding for OpenMath.<br class="">
It actually seems that Nathan Carter has already done something very<br class="">
much like that.  [1]<br class="">
Would it make sense to standardize a JSON binding of OpenMath? After<br class="">
all, JSON is one of the practical competitors for XML and used A LOT on<br class="">
the web.<br class="">
[1] <a href="https://lurchmath.github.io/openmath-js/site/" class="">https://lurchmath.github.io/openmath-js/site/</a><br class="">
</blockquote>
<br class="">
 For anyone else interested, here is a direct link to the docs: (please note that I'm not the author)<br class="">
<a href="https://github.com/lurchmath/openmath-js/blob/master/openmath.litcoffee#openmath-module" class="">https://github.com/lurchmath/openmath-js/blob/master/openmath.litcoffee#openmath-module</a><br class="">
<br class="">
 Some concrete examples:<br class="">
https://github.com/lurchmath/openmath-js/blob/master/openmath-spec.litcoffee#should-decode-valid-simple-forms<br class="">
<br class="">
 For instance, let's compare the encoding of $x+5$:<br class="">
<br class="">
 - OpenMath:<br class="">
   <OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMA><OMS cd="arith1" name="plus"/><OMV name="x"/><OMI>5</OMI></OMA></OMOBJ><br class="">
<br class="">
 - openmath-js:<br class="">
   {"t":"a", c:[ {"t":"sy", "cd":"arith1", "n":"plus"}, {"t":"v", "n":"x"}, {"t":"i", "v":"5"} ] }<br class="">
<br class="">
 There is another way to encode XML as JSON, called JSONML, which is pretty much LISP with square brackets:<br class="">
http://jsonml.org/<br class="">
<br class="">
 - JSONML:<br class="">
   ["OMOBJ", {"xmlns":"http://www.openmath.org/OpenMath"}, ["OMA", ["OMS", {"cd":"arith1", "name":"plus"}], ["OMV", {"name":"x"}], ["OMI", "5"] ]]<br class="">
<br class="">
 As a standard encoding, I'd rather recommend JSONML because it is a straight mapping of the XML syntax and there are implementations of it for several programming languages. I've used it extensively for web applications, generating HTML and XML for both personal
 projects and work for customers, and it works well in practice.<br class="">
<br class="">
 Cheers,<br class="">
-- <br class="">
   Alberto González Palomo<br class="">
   Toledo, España / Saarbrücken, Deutschland<br class="">
   https://matracas.org<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>