aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 793c366..99a8f35 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -76,8 +76,9 @@ namespace OpenSim.Region.Capabilities
76 writer.WriteStartElement(String.Empty, "key", String.Empty); 76 writer.WriteStartElement(String.Empty, "key", String.Empty);
77 writer.WriteString(fields[i].Name); 77 writer.WriteString(fields[i].Name);
78 writer.WriteEndElement(); 78 writer.WriteEndElement();
79 libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( 79 LLSD.LLSDWriteOne(writer, fieldValue);
80 writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue)); 80 // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement(
81 // writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue));
81 } 82 }
82 } 83 }
83 writer.WriteEndElement(); 84 writer.WriteEndElement();
@@ -100,12 +101,13 @@ namespace OpenSim.Region.Capabilities
100 } 101 }
101 else 102 else
102 { 103 {
103 libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( 104 LLSD.LLSDWriteOne(writer, obj);
104 writer, libsecondlife.StructuredData.LLSD.FromObject(obj)); 105 //libsecondlife.StructuredData.LLSDParser.SerializeXmlElement(
106 // writer, libsecondlife.StructuredData.LLSD.FromObject(obj));
105 } 107 }
106 } 108 }
107 109
108 public static object DeserialiseLLSDMap(libsecondlife.StructuredData.LLSDMap llsd, object obj) 110 public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
109 { 111 {
110 Type myType = obj.GetType(); 112 Type myType = obj.GetType();
111 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); 113 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
@@ -120,10 +122,12 @@ namespace OpenSim.Region.Capabilities
120 FieldInfo field = myType.GetField((string) enumerator.Key); 122 FieldInfo field = myType.GetField((string) enumerator.Key);
121 if (field != null) 123 if (field != null)
122 { 124 {
123 if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) 125 // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap)
126 if (enumerator.Value is Hashtable)
124 { 127 {
125 object fieldValue = field.GetValue(obj); 128 object fieldValue = field.GetValue(obj);
126 DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue); 129 DeserialiseLLSDMap((Hashtable)enumerator.Value, fieldValue);
130 // DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue);
127 } 131 }
128 else if (enumerator.Value is ArrayList) 132 else if (enumerator.Value is ArrayList)
129 { 133 {