Adds the parameter for OSD serialization to encode default values. This
makes the JsonStore get/set operations symmetric.user_profiles
parent
d3b2cdc2b4
commit
4b8c22ecfa
|
@ -134,6 +134,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
|||
|
||||
public JsonStore(string value) : this()
|
||||
{
|
||||
// This is going to throw an exception if the value is not
|
||||
// a valid JSON chunk. Calling routines should catch the
|
||||
// exception and handle it appropriately
|
||||
if (String.IsNullOrEmpty(value))
|
||||
ValueStore = new OSDMap();
|
||||
else
|
||||
|
@ -574,14 +577,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
|||
// The path pointed to an intermediate hash structure
|
||||
if (result.Type == OSDType.Map)
|
||||
{
|
||||
value = OSDParser.SerializeJsonString(result as OSDMap);
|
||||
value = OSDParser.SerializeJsonString(result as OSDMap,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// The path pointed to an intermediate hash structure
|
||||
if (result.Type == OSDType.Array)
|
||||
{
|
||||
value = OSDParser.SerializeJsonString(result as OSDArray);
|
||||
value = OSDParser.SerializeJsonString(result as OSDArray,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(string.Format("[JsonStore]: Unable to initialize store from {0}", value), e);
|
||||
m_log.ErrorFormat("[JsonStore]: Unable to initialize store from {0}", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue