Xamarin / Android - NewtonSoft Deserialization Bug (Solution)

x BlueRobot

Administrator
Staff member
I came across an interesting bug today at work; I'm currently responsible for maintaining an ageing Xamarin app, and for some reason, the NewtonSoft JSON serializer was refusing to convert the JSON string to the given type since it couldn't find a constructor to use - despite explicitly specifying a suitable constructor! Oddly enough, the solution was to set the Linking property for the Android project to be None. This isn't an ideal solution but it was the only solution which worked.

Here's some additional information on the linker and the Android project - Linking on Android - Xamarin

I managed to find the solution in a couple of obscure threads but I thought I would share the solution here as well.
 
Back
Top