cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brodybits <...@git.apache.org>
Subject [GitHub] cordova-wp8 pull request: Added Newtonsoft json dll
Date Tue, 12 May 2015 19:31:24 GMT
Github user brodybits commented on the pull request:

    https://github.com/apache/cordova-wp8/pull/79#issuecomment-101394601
  
    > If we can avoid the breaking change it would be better and in this case we have a
solution that works well to avoid it (apache/cordova-plugin-file-transfer#72). I understand
Newtonsoft JSON is a better API and is more efficient.
    
    The only real trouble spot I have seen is in the PluginResult class, in case a plugin
returns an arbitrary data type (such as a byte array). To solve this, we can modify the PluginResult
to use an internal function that uses `DataContractJsonSerializer` (along with a `StreamReader`)
to convert the plugin result to JSON. I am happy to issue a PR for this if you need it.
    
    Of course, to be absolutely safe, we could revert the changes to `template/cordovalib/JSON/JsonHelper.cs`
but keep the Newtonsoft JSON library for those plugins that want to use it. IMHO, it should
be safe for this project to use the Newtonsoft JsonConvert functions in all cases except for
PluginResult.cs. And finally document it for the plugin authors.
    
    An extreme solution would be to rename (or remove) the functions in JsonHelper.cs and
change the order of the parameters in the PluginResult() constructor, in order to *force*
the plugin authors to review and update their code.
    
    >  I would not expect cordova-wp8 to wither and die anytime soon.
    
    In addition, it is my understanding is that cordova-wp8 is (still) needed to support Windows
Phone in PhoneGap build.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message