当前位置: 动力学知识库 > 问答 > 编程问答 >

visual studio 2015 - JsonConvert not working in PCL in Xamarin iOS App

问题描述:

I tried to serialize a simple object inside the PCL it just returns a "{}" string. However, it does not throw any exceptions.

var test = new

{

Email = email,

Password = password,

Username = username

};

var testJson = JsonConvert.SerializeObject(test);

When I inspect the JsonConvertobject inside the VS debugger it says that the method SerializeObject is an unknown member. Furthermore, when I inspect the DeserializeMethod, it says:

Could not resolve type: global::Newtonsoft.Json.JsonConvert.DeserializeObject<DefaultResponse>

Both methods are displayed as variables inside the debugger.

分享给朋友:
您可能感兴趣的文章:
随机阅读: