<div dir="ltr"><div>For the number of field there is in the spec, I don&#39;t consider having a JSON to schama really worthwhile.<br></div>If you fear it is error prone, then we should provide some testing data for the BIP70. (Which I already did for protobuf, but was rejected, because deemed no useful thanks to the code generator... But such code generator gave me inconsistencies with gavin&#39;s implementation for example)<br><div><div><div><br></div><div>Why do you think type support is very useful in our case ? we have 3 types, and dealing only with bytes, int, and string.<br></div><div>It cost me more time to find a suitable cross plateform lib for protobuf (in c#, that works in ios and winrt) than I would by just coding the json wrapper classes by hand. (JSON libs are more wildspread and supported than protobuf)<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 17:04 GMT+01:00 Jeff Garzik <span dir="ltr">&lt;<a href="mailto:jgarzik@bitpay.com" target="_blank">jgarzik@bitpay.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Not to mention the tiresome and error-prone task of writing your own JSON-to-schema marshalling code -- or something equivalent to the protobufs compiler and libs for JSON.<br><br></div>protobufs -- and its modern competitors such as msgpack -- natively provide type support in a way that must be hacked into JSON or XML.<br><br></div>The protobuf/msgpack design is engineered to avoid bugs routinely found in JSON parsing code; due to the amount of code &amp; effort involved in JSON input sanity checking, bugs and inconsistencies inevitable arise.  We have seen this in bitcoind with JSON-RPC.<br><br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Jan 28, 2015 at 10:42 AM, Mike Hearn <span dir="ltr">&lt;<a href="mailto:mike@plan99.net" target="_blank">mike@plan99.net</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>On the other hand, if you charge the
 developer (and not the plateform) to check certificate validity, it 
means that you have to develop a different codebase for all plateform 
you are targeting, because each plateform store trusted root certificate
 in a different manner with different APIs, and also have different 
types representing a X509 Certificate.<br></div></div></div></blockquote><div><br></div></span><div>That&#39;s what cross-platform abstraction libraries are for. Both Java and Qt provide a key store library that can load from either the OS root store or a custom one. If your chosen app platform doesn&#39;t, OK, then you&#39;ll have to make or find one yourself. Perhaps contribute it upstream or make it a library. But that&#39;s not a limitation of BIP70.</div><div><br></div><div>Just as a reminder, there is no obligation to use the OS root store. You can (and quite possibly should) take a snapshot of the Mozilla/Apple/MSFT etc stores and load it in your app. We do this in bitcoinj by default to avoid cases where BIP70 requests work on some platforms and not others, although the developer can easily override this and use the OS root store instead.</div><div> </div><div>Of all possible solutions, using a third party service to convert things to JSON is one of the least obvious and highest effort. I don&#39;t know anyone else who arrived at such a conclusion and respectfully disagree that this is a problem with the design choices in BIP70. It sounds like a bizarre hack around lack of features in whatever runtime you&#39;re using.</div><div><br></div></div></div></div>
<br></div></div>------------------------------------------------------------------------------<br>
Dive into the World of Parallel Programming. The Go Parallel Website,<br>
sponsored by Intel and developed in partnership with Slashdot Media, is your<br>
hub for all things parallel software development, from weekly thought<br>
leadership blogs to news, videos, case studies, tutorials and more. Take a<br>
look and join the conversation now. <a href="http://goparallel.sourceforge.net/" target="_blank">http://goparallel.sourceforge.net/</a><br>_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net" target="_blank">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Jeff Garzik<br>Bitcoin core developer and open source evangelist<br>BitPay, Inc.      <a href="https://bitpay.com/" target="_blank">https://bitpay.com/</a></div>
</font></span></div>
</blockquote></div><br></div></div></div></div></div></div>