Newtonsoft.JSON serializeobject returns empty JSON string [duplicate]
Your question is a little misleading since you show your class properties as public.
Also, I noticed that although my Customer class is public, its members are non-public:
WIth that being said these are your options:
- If your properties can be public, make them public
- If the properties need to remain private, add the
[JsonProperty]
attribute to them
It appears that Xamarin Live Player has some issues with the serializer. I tried plugging my phone via USB and it works!