* Fixed a nasty OSD->JSON bug that was producing invalid JSON for empty arrays or dictionaries

* Several fixes in OpenMetaverse.Http.CapsServer and OpenMetaverse.Http.EventQueueServer (this is the first time they've been tested)
[Simian]
* Initial capabilities and EventQueue support (appears to be working)
* HyperGrid is almost working
* More cleanup with how agents are removed from the scene

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2427 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-02-04 23:00:33 +00:00
parent 875aa0b6e8
commit 808b681b83
17 changed files with 689 additions and 138 deletions

View File

@@ -132,12 +132,14 @@ namespace OpenMetaverse.StructuredData
return new JsonData("b64::" + Convert.ToBase64String(osd.AsBinary()));
case OSDType.Array:
JsonData jsonarray = new JsonData();
jsonarray.SetJsonType(JsonType.Array);
OSDArray array = (OSDArray)osd;
for (int i = 0; i < array.Count; i++)
jsonarray.Add(SerializeJson(array[i]));
return jsonarray;
case OSDType.Map:
JsonData jsonmap = new JsonData();
jsonmap.SetJsonType(JsonType.Object);
OSDMap map = (OSDMap)osd;
foreach (KeyValuePair<string, OSD> kvp in map)
jsonmap[kvp.Key] = SerializeJson(kvp.Value);