JsonConvert.SerializeObject always return {} in XamarinForms
I tried setting up emulator on a fast machine and the serialize works! So it means it doesn't work when i run it on live player using my android phone. I will set this as an answer for now. if someone else posted on how to make it work on live player, i will set it as the correct answer
Newtonsoft.JSON serializeobject returns empty JSON string
It appears that Xamarin Live Player has some issues with the serializer. I tried plugging my phone via USB and it works!
Newtonsoft.Json deserialize object in Xamarin iOS project
Just got back to this problem. In case anyone‘s wondering: Turns out the Xamarin Live Player I’ve recently had to use has some problems with Json.NET. (https://developer.xamarin.com/guides/cross-platform/live/limitations/)
I knew it had to be something stupid... Well maybe I can save someone else some time!
Javascript Escape from Json.Net
I found a nice one-liner solution, but it has only been in the framework since 4.0. Would be nice to have something similar in Json.NET I can use on < 4.0 projects.
HttpUtility.JavaScriptStringEncode
example:
HttpUtility.JavaScriptStringEncode(@"hi bud's \no way\")
Returns: hi bud\u0027s \\no way\\
Newtonsoft.Json works in Unity Editor but not on mobile devices
I Installed the Newtonsoft.Json using the NuGet and it appears in the references.
Newtonsoft.Json from NuGet is not supported in Unity3d il2cpp targets, like mobile devices. Use a Newtonsoft.Json fork from the asset store, like this one.
Related Topics
How to Load All Assemblies from Within Your /Bin Directory
Multiple Aggregates/Repositories in One Transaction
Calling Async Methods from Non-Async Code
How to Send an Email in .Net According to New Security Policies
Connect to Active Directory via Ldap
How to Convert a Datetime to the Number of Seconds Since 1970
Accelerating Bitmap Grayscale Conversion, Is Openmp an Option in C#
Convert PDF to Image Without Using Ghostscript Dll
Display Custom Error Page When File Upload Exceeds Allowed Size in ASP.NET MVC
How to Concatenate Two Ienumerable<T> into a New Ienumerable<T>
Create Web Service Proxy in Visual Studio from a Wsdl File
Deserializing Heterogenous JSON Array into Covariant List<> Using JSON.Net
From Excel to Datatable in C# with Open Xml
Random Errors Using Wait for Element Clickable Method in Selenium