Going through ridiculous contortions to prevent OpenMetaverse.StructuredData.dll from crashing on Mono while decoding JSON objects

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3066 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-08-06 19:37:33 +00:00
parent 52ed43a9fd
commit a5cc49b4d6

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using LitJson;
@@ -46,8 +48,9 @@ namespace OpenMetaverse.StructuredData
return array;
case JsonType.Object:
OSDMap map = new OSDMap(json.Count);
foreach (KeyValuePair<string, JsonData> kvp in json)
map.Add(kvp.Key, DeserializeJson(kvp.Value));
IDictionaryEnumerator e = ((IOrderedDictionary)json).GetEnumerator();
while (e.MoveNext())
map.Add((string)e.Key, DeserializeJson((JsonData)e.Value));
return map;
case JsonType.None:
default: