patch json decode to return null if something goes wrong
This commit is contained in:
parent
68681629a8
commit
73239fc408
1 changed files with 10 additions and 1 deletions
|
|
@ -20,7 +20,16 @@ namespace OpenMetaverse.StructuredData
|
||||||
|
|
||||||
public static OSD DeserializeJson(string json)
|
public static OSD DeserializeJson(string json)
|
||||||
{
|
{
|
||||||
return DeserializeJson(JsonMapper.ToObject(json));
|
try
|
||||||
|
{
|
||||||
|
JsonData A = JsonMapper.ToObject(json);
|
||||||
|
return DeserializeJson(A);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return null; // something fucky happened to the input
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OSD DeserializeJson(JsonData json)
|
public static OSD DeserializeJson(JsonData json)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue