incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abu Obeida Bakhach (JIRA)" <>
Subject [jira] [Created] (CB-938) Need to pass more complex objects over the bridge
Date Tue, 19 Jun 2012 23:50:42 GMT
Abu Obeida Bakhach created CB-938:

             Summary: Need to pass more complex objects over the bridge
                 Key: CB-938
             Project: Apache Cordova
          Issue Type: Bug
          Components: WP7
    Affects Versions: 1.9.0
            Reporter: Abu Obeida Bakhach
            Assignee: Jesse MacFadyen

[WP7] Passing more complex objects over the bridge... Currently won't work. Basically the
DataContractJsonSerializer .NET object that we employ to parse JSON on the native side can't
parse nested objects in JSON. The DataContract stuff is supposed to make it easy to cast the
various JSON values to .NET types. In the case of a nested object with dynamic keys, that
you can't model ahead of time, we tried using a Dictionary type on the native side. This won't
work [1].

This came up when deserializing FileTransfer upload options because they have a nested "params"
object that house dynamic &key=value URL parameters to send with the HTTP request. Not
sure if it happens in other spots.

Anywho, one potential solution is to explicitly convert nested objects such as these to a
dumber structure. In the SO thread [1] they suggest having an array of {key:"known1",value:"foo"}
pairs replace the objects.
The native side could parse that.

Another option is to use the library [2]. MIT license. 300-ish kb .dll.

The stock System.Json namespace that is available in .NET and has better capabilities is not
available on Windows Phone.

Any other solutions/ideas/comments/thoughts?


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message