Greetings,<br><br>I have a not totally useless Perl implementation of JSYNC.pm on CPAN and GitHub now.<br><br><ul><li><a href="http://search.cpan.org/dist/JSYNC/">http://search.cpan.org/dist/JSYNC/</a></li><li><a href="http://github.com/ingydotnet/jsync-pm">http://github.com/ingydotnet/jsync-pm</a><br>
</li></ul><br>It is passing these 6 data driven roundtripping tests, which should be easily grokkable:<br><br><div style="margin-left: 40px;"><a href="http://github.com/ingydotnet/jsync-pm/blob/master/t/jsync-yaml.tml">http://github.com/ingydotnet/jsync-pm/blob/master/t/jsync-yaml.tml</a><br>
</div><br>Here is the (reasonably small amount of) source code:<br><br><div style="margin-left: 40px;"><a href="http://github.com/ingydotnet/jsync-pm/blob/master/lib/JSYNC.pm">http://github.com/ingydotnet/jsync-pm/blob/master/lib/JSYNC.pm</a><br>
</div><br>It has a dump() and a load() function. dump() takes a Perl object, makes a full clone in the JSYNC/JSON style, and JSON encodes it. load() takes a JSYNC string, JSON decodes it, and makes a full clone to a native Perl object.<br>
<br>The full clone in both directions seems a bit heavy handed, but I think it is too soon to make premature optimizations. I want to get a common test suite passing in several languages, and then think about optimization refactoring.<br>
<br>The tests point out that it might be a good time to revisit the default tags for objects. Having the term &#39;perl&#39; in there will surely not pass on Python, etc. The Python defaults are also not portable.<br><br>
Enjoy, Ingy<br>