incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: Hack to compass.js to support iOS watchHeadingFilter
Date Tue, 03 Apr 2012 21:20:30 GMT

>Switching from an array to an object will change the Plugin exec signature
>for all plugins.  I need to maintain compatibility with JSONArray until
>2.0.  So, is there a good way to support both?

We can parse the JSON string coming into PluginManager into either a
JSONArray or JSONObject and rely on an exception to be thrown if we end up
parsing into the wrong structure.


JSONObject constructor
http://developer.android.com/reference/org/json/JSONObject.html#JSONObject(
java.lang.String)
JSONArray constructor
http://developer.android.com/reference/org/json/JSONArray.html#JSONArray(ja
va.lang.String)


Mime
View raw message