public static new DataPacket Deserialize(string json)
{
try
{
var ret = new MsgGeneralFailure();
var obj = Json.Decode(json);
ret.Message = obj["message"];
ret.Received = obj["received"];
return ret;
}
catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
{
throw new ParseException(json, "General binding exception");
}
catch (ArgumentException)
{
throw new ParseException(json, "Invalid JSON");
}
}