<div dir="ltr">I&#39;d like to start the migration in the following way:<div><br></div><div>1) write a JSON version of all existing APIs</div><div>2) refactor all normal APIs to use JSON API internally and still output the same text result as before</div><div>3) It would be easy support other formats like XML and web once all APIs are internally JSON</div><div>4) Use modern way to require a desired format like use &quot;Accept&quot; header in HTTP to chose JSON/XML/Text etc.</div><div><br></div><div>I would experiment a bit if the idea sounds good.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 27, 2015 at 11:36 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">we have added the jsonapi interface but almost nothing uses it yet.  Migrating functions to it will be a project over time<div class="HOEnZb"><div class="h5"><span></span><br><br>On Wednesday, August 26, 2015, David McNab &lt;<a href="mailto:davidmcnabnz@gmail.com" target="_blank">davidmcnabnz@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi there,<br><br></div>How do you do API calls in JSON? Or, how do I get a list of all the API calls which can receive JSON parameters and return JSON return values?<br><br></div>For example, in the console, I tried &#39;show calls&#39;, and got a list of calls. I did the same call from via XML-RPC from a python script, and got a single string back, containing what would have been output to the console. But when I tried, from the console:<br><br></div><div><span style="font-family:monospace,monospace"><b>json {&quot;command&quot;:&quot;show calls&quot;, &quot;format&quot;:&quot;pretty&quot;, &quot;data&quot;:{}}</b></span><br></div><div><br>I got an invalid response.<br><br></div><div>I also tried:<br><br><b>json {&quot;command&quot;:&quot;show&quot;, &quot;format&quot;:&quot;pretty&quot;, &quot;data&quot;:&quot;calls&quot;}</b><br><br></div><div>but got similar.<br><br></div><div>Is there a general sceme for invoking all the console API commands (and receiving responses) in JSON format?<br><br></div><div>If not, I guess I need to write some parsers to process each command&#39;s output string.<br><br></div><div>Cheers<br></div><div>David<br><br></div></div>
</blockquote>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">About: <a href="http://about.me/dujinfang" target="_blank">http://about.me/dujinfang</a><br>Blog: <a href="http://www.dujinfang.com" target="_blank">http://www.dujinfang.com</a><br>Proj:  <a href="http://www.freeswitch.org.cn" target="_blank">http://www.freeswitch.org.cn</a></div>
</div>