* Added JSON library to parse LLSD fields in the login reply

* Added fields in Avatar to hold the parsed data from login
* CoarseLocationUpdate packets handled internally
* Added Network.LoginValues hashtable, removed second parameter from .Login()
* Updated examples to reflect LoginValues / Login() change

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@39 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2006-07-01 03:42:53 +00:00
parent e224631fc7
commit b4accdddfc
20 changed files with 3224 additions and 44 deletions

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using System.Text;
namespace Nii.JSON
{
/// <summary>
/// Summary description for JsonFacade.
/// </summary>
public sealed class JsonFacade
{
/// <summary>
/// Parse a Hashtable and return a JSON formatted string
/// </summary>
/// <param name="idict"></param>
/// <returns></returns>
public static string toJSON(IDictionary idict)
{
JSONObject jsob = new JSONObject(idict);
return jsob.ToString();
}
/// <summary>
/// Parse JSON formatted string and return a Hashtable
/// </summary>
/// <param name="sJSON"></param>
/// <returns></returns>
public static IDictionary fromJSON(string sJSON)
{
JSONObject jsob = new JSONObject(sJSON);
IDictionary idict = jsob.getDictionary();
return idict;
}
}
}