Awesome! Well done, Nic! Cheers
On Wed, Jul 11, 2012 at 8:52 PM, Nic Wise <[email protected]> wrote: > OK, I found the problem. Well, Marek from Xamarin did. I just did the > RestSharp pull request :) > > https://github.com/restsharp/RestSharp/pull/295 > > Basically, on line 201 of JsonDeserializer, change > > var listType = type.GetInterfaces().First(x => > x.GetGenericTypeDefinition() == typeof(IList<>)); > to > > var listType = type.GetInterfaces().First(x => x.IsGenericType && > x.GetGenericTypeDefinition() == typeof(IList<>)); > > > On Sun, Jul 8, 2012 at 2:12 PM, Nic Wise <[email protected]> wrote: > > It appears to be a result of a recent change in RestSharp > > > > https://github.com/restsharp/RestSharp/issues/293 > > > > easy fix. Maybe. > > > > On Sun, Jul 8, 2012 at 12:26 PM, Nic Wise <[email protected]> > wrote: > >> looks like its an issue in 5.2.12 as well. I've updated the bug. > >> > >> I might look at the RestSharp code, and go back to using NewtonSoft's > >> JSON parser... never had an issue with that one > >> > >> On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise <[email protected]> > wrote: > >>> I've bugged it: > >>> > >>> https://bugzilla.xamarin.com/show_bug.cgi?id=6031 > >>> > >>> Feel free to add to that. > >>> > >>> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise <[email protected]> > wrote: > >>>> yeah, me too. I just pulled in 103.1, which I think is causing issues. > >>>> I'll try the #define thing. > >>>> > >>>> In RestClient.Sync.cs I had to remove the virtual from here too > >>>> > >>>> public IRestResponse<T> Execute<T>(IRestRequest request) where T : > new() > >>>> { > >>>> var raw = Execute(request); > >>>> return Deserialize<T>(request, raw); > >>>> } > >>>> > >>>> > >>>> > >>>> On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow <[email protected]> > wrote: > >>>>> Hi, > >>>>> > >>>>> I'm having the same issue with RestSharp (but very inconsistent), > although, > >>>>> switching to SimpleJson (included in the project) with the #define > >>>>> SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I > won't loose > >>>>> my data to linker), somewhat solved my issue. > >>>>> > >>>>> I'm still seeing some weird stuff (like "System.ArgumentException: > failed to > >>>>> convert parameters at System.Reflection.MonoMethod.Invoke..." on both > >>>>> Simulator and Device), but I figured it could be my code being > incompatible, > >>>>> as I just updated RestSharp, which I haven't done in ages. > >>>>> > >>>>> Mikkel > >>>>> > >>>>> On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise <[email protected]> > wrote: > >>>>>> > >>>>>> And to fix my own issue (kinda) > >>>>>> > >>>>>> This may be: > >>>>>> > >>>>>> -aot "nimt-trampolines=512," > >>>>>> > >>>>>> NOTE the comma. > >>>>>> > >>>>>> OR: I had a method, in a library somewhere, which was marked virtual > >>>>>> AND had a generic, which isn't allowed. I've removed the virtual > (it's > >>>>>> in RestSharp, FWIW) > >>>>>> > >>>>>> > >>>>>> > >>>>>> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise <[email protected]> > wrote: > >>>>>> > This one is confusing the hell out of me. > >>>>>> > > >>>>>> > Works in the Simulator, but not on the device, so I assume it's a > >>>>>> > linking or AOT problem > >>>>>> > > >>>>>> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full > >>>>>> > and I've got "link sdk assemblies" for linking. I added the > --aot=full > >>>>>> > thing recently, or I get a different issue (see my other email) > >>>>>> > > >>>>>> > Exception is: > >>>>>> > > >>>>>> > Operation is not valid due to the current state of the object > >>>>>> > > >>>>>> > at System.MonoType.GetGenericTypeDefinition () [0x0000d] in > >>>>>> > > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673 > >>>>>> > at RestSharp.Deserializers.JsonDeserializer.<BuildList>m__31 > >>>>>> > (System.Type x) [0x00000] in > >>>>>> > > >>>>>> > > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201 > >>>>>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source, > >>>>>> > System.Func`2 predicate, Fallback fallback) [0x00013] in > >>>>>> > > >>>>>> > > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812 > >>>>>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source, > >>>>>> > System.Func`2 predicate) [0x00007] in > >>>>>> > > >>>>>> > > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843 > >>>>>> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type > >>>>>> > type, System.Object parent) [0x0000c] in > >>>>>> > > >>>>>> > > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201 > >>>>>> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object > target, > >>>>>> > IDictionary`2 data) [0x0031d] in > >>>>>> > > >>>>>> > > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152 > >>>>>> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData] > >>>>>> > (IRestResponse response) [0x000bf] in > >>>>>> > > >>>>>> > > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50 > >>>>>> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest > request, > >>>>>> > IRestResponse raw) [0x0004a] in > >>>>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505 > >>>>>> > > >>>>>> > > >>>>>> > -- > >>>>>> > Nic Wise > >>>>>> > t. +44 7788 592 806 | @fastchicken | > http://www.linkedin.com/in/nicwise > >>>>>> > b. http://www.fastchicken.co.nz/ > >>>>>> > > >>>>>> > Earnest: Self-employed? Track your business expenses and income. > >>>>>> > http://earnestapp.com > >>>>>> > Nearest Bus: find when the next bus is coming to your stop. > >>>>>> > http://goo.gl/Vcz1p > >>>>>> > mobileAgent (for FreeAgent): get your accounts in your pocket. > >>>>>> > http://goo.gl/IuBU > >>>>>> > Trip Wallet: Keep track of your budget on the go: > http://goo.gl/ePhKa > >>>>>> > London Bike App: Find the nearest Boris Bike, and get riding! > >>>>>> > http://goo.gl/Icp2 > >>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Nic Wise > >>>>>> t. +44 7788 592 806 | @fastchicken | > http://www.linkedin.com/in/nicwise > >>>>>> b. http://www.fastchicken.co.nz/ > >>>>>> > >>>>>> Earnest: Self-employed? Track your business expenses and income. > >>>>>> http://earnestapp.com > >>>>>> Nearest Bus: find when the next bus is coming to your stop. > >>>>>> http://goo.gl/Vcz1p > >>>>>> mobileAgent (for FreeAgent): get your accounts in your pocket. > >>>>>> http://goo.gl/IuBU > >>>>>> Trip Wallet: Keep track of your budget on the go: > http://goo.gl/ePhKa > >>>>>> London Bike App: Find the nearest Boris Bike, and get riding! > >>>>>> http://goo.gl/Icp2 > >>>>>> _______________________________________________ > >>>>>> MonoTouch mailing list > >>>>>> [email protected] > >>>>>> http://lists.ximian.com/mailman/listinfo/monotouch > >>>>> > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Nic Wise > >>>> t. +44 7788 592 806 | @fastchicken | > http://www.linkedin.com/in/nicwise > >>>> b. http://www.fastchicken.co.nz/ > >>>> > >>>> Earnest: Self-employed? Track your business expenses and income. > >>>> http://earnestapp.com > >>>> Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > >>>> mobileAgent (for FreeAgent): get your accounts in your pocket. > >>>> http://goo.gl/IuBU > >>>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > >>>> London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > >>> > >>> > >>> > >>> -- > >>> Nic Wise > >>> t. +44 7788 592 806 | @fastchicken | > http://www.linkedin.com/in/nicwise > >>> b. http://www.fastchicken.co.nz/ > >>> > >>> Earnest: Self-employed? Track your business expenses and income. > >>> http://earnestapp.com > >>> Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > >>> mobileAgent (for FreeAgent): get your accounts in your pocket. > >>> http://goo.gl/IuBU > >>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > >>> London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > >> > >> > >> > >> -- > >> Nic Wise > >> t. +44 7788 592 806 | @fastchicken | > http://www.linkedin.com/in/nicwise > >> b. http://www.fastchicken.co.nz/ > >> > >> Earnest: Self-employed? Track your business expenses and income. > >> http://earnestapp.com > >> Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > >> mobileAgent (for FreeAgent): get your accounts in your pocket. > >> http://goo.gl/IuBU > >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > >> London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > > > > > > > > -- > > Nic Wise > > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise > > b. http://www.fastchicken.co.nz/ > > > > Earnest: Self-employed? Track your business expenses and income. > > http://earnestapp.com > > Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > > mobileAgent (for FreeAgent): get your accounts in your pocket. > > http://goo.gl/IuBU > > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > > London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise > b. http://www.fastchicken.co.nz/ > > Earnest: Self-employed? Track your business expenses and income. > http://earnestapp.com > Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > mobileAgent (for FreeAgent): get your accounts in your pocket. > http://goo.gl/IuBU > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
