aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index 82a4da7..3bad06c 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -131,15 +131,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
131 m_TakeStore = new List<TakeValueCallbackClass>(); 131 m_TakeStore = new List<TakeValueCallbackClass>();
132 m_ReadStore = new List<TakeValueCallbackClass>(); 132 m_ReadStore = new List<TakeValueCallbackClass>();
133 } 133 }
134 134
135 public JsonStore(string value) : this() 135 public JsonStore(string value) : this()
136 { 136 {
137 // This is going to throw an exception if the value is not
138 // a valid JSON chunk. Calling routines should catch the
139 // exception and handle it appropriately
137 if (String.IsNullOrEmpty(value)) 140 if (String.IsNullOrEmpty(value))
138 ValueStore = new OSDMap(); 141 ValueStore = new OSDMap();
139 else 142 else
140 ValueStore = OSDParser.DeserializeJson(value); 143 ValueStore = OSDParser.DeserializeJson(value);
141 } 144 }
142 145
143 // ----------------------------------------------------------------- 146 // -----------------------------------------------------------------
144 /// <summary> 147 /// <summary>
145 /// 148 ///
@@ -574,14 +577,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
574 // The path pointed to an intermediate hash structure 577 // The path pointed to an intermediate hash structure
575 if (result.Type == OSDType.Map) 578 if (result.Type == OSDType.Map)
576 { 579 {
577 value = OSDParser.SerializeJsonString(result as OSDMap); 580 value = OSDParser.SerializeJsonString(result as OSDMap,true);
578 return true; 581 return true;
579 } 582 }
580 583
581 // The path pointed to an intermediate hash structure 584 // The path pointed to an intermediate hash structure
582 if (result.Type == OSDType.Array) 585 if (result.Type == OSDType.Array)
583 { 586 {
584 value = OSDParser.SerializeJsonString(result as OSDArray); 587 value = OSDParser.SerializeJsonString(result as OSDArray,true);
585 return true; 588 return true;
586 } 589 }
587 590