using System;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using System.Text;
namespace Nii.JSON
{
///
/// Summary description for JsonFacade.
///
public sealed class JsonFacade
{
///
/// Parse a Hashtable and return a JSON formatted string
///
///
///
public static string toJSON(IDictionary idict)
{
JSONObject jsob = new JSONObject(idict);
return jsob.ToString();
}
///
/// Parse JSON formatted string and return a Hashtable
///
///
///
public static IDictionary fromJSON(string sJSON)
{
JSONObject jsob = new JSONObject(sJSON);
IDictionary idict = jsob.getDictionary();
return idict;
}
}
}