2006-10-21 02:52:28 +00:00
|
|
|
using System;
|
2006-10-21 05:53:58 +00:00
|
|
|
using System.Collections.Generic;
|
2006-10-21 02:52:28 +00:00
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace Nii.JSON
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Summary description for JsonFacade.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class JsonFacade
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2006-10-25 10:41:43 +00:00
|
|
|
/// Parse JSON formatted string and return a dictionary
|
2006-10-21 02:52:28 +00:00
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sJSON"></param>
|
|
|
|
|
/// <returns></returns>
|
2006-10-21 05:53:58 +00:00
|
|
|
public static Dictionary<string, object> fromJSON(string sJSON)
|
2006-10-21 02:52:28 +00:00
|
|
|
{
|
|
|
|
|
JSONObject jsob = new JSONObject(sJSON);
|
2006-10-21 05:53:58 +00:00
|
|
|
Dictionary<string, object> idict = jsob.getDictionary();
|
2006-10-21 02:52:28 +00:00
|
|
|
return idict;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|