I'm using Facebook C# SDK. In general it works fine but for a unit test I have开发者_开发问答 to create a JSONObject on my own. First I tried with "JSONObject.Add" but I did not find out how to write subnodes then. So I started working with XML and using "SerializeXMLNode". This works fine, so now I have the JSON-String. But how could I create a JSONObject from this string now??
using System.Net;
//
string jsonString = [YOUR JSON-STRING];
var json = new WebClient().DownloadString(jsonUrl);
I hope this helps.
精彩评论