JsonConvert.SerializeObject always return {} in XamarinForms

后端 未结 2 2024
渐次进展
渐次进展 2020-11-27 08:34

JsonConvert.SerializeObject seems to be not working in xamarin forms. Or i might be missing something here. Here is the output when i serialize a simple object.

See

2条回答
  •  误落风尘
    2020-11-27 08:40

    This is a known problem see https://developer.xamarin.com/guides/cross-platform/live/limitations/

    Limited support for reflection (currently affects some popular NuGets, like SQLite and Json.NET). Other NuGets are still supported.

    If you compile it to an APK it works fine on the actual device.

    Also posted an issue here: https://github.com/JamesNK/Newtonsoft.Json/issues/1578

提交回复
热议问题