Remove JSON references

dev_timestamp
Harald Wolff 2019-08-19 14:10:24 +02:00
parent cd94cf7201
commit 2cdd9d13fa
2 changed files with 0 additions and 55 deletions

View File

@ -14,42 +14,6 @@ namespace ln.types.rpc
{
Identifier = Guid.NewGuid();
}
/*
public RPCCall(JObject json)
{
if (json.ContainsKey("id"))
{
switch (json["id"].Type)
{
case JTokenType.Integer:
Identifier = json["id"].ToObject<int>();
break;
case JTokenType.Float:
Identifier = json["id"].ToObject<float>();
break;
case JTokenType.String:
Identifier = json["id"].ToObject<string>();
break;
default:
throw new NotSupportedException(String.Format("JToken {0} is not supported as RPCCall.Identifier",json["id"]));
}
}
else
{
Identifier = Guid.NewGuid();
}
if (json.ContainsKey("module"))
ModuleName = json["module"].ToObject<string>();
if (json.ContainsKey("method"))
MethodName = json["method"].ToObject<string>();
if (json.ContainsKey("parameters"))
Parameters = json["parameters"].ToObject<object[]>();
else
Parameters = new object[0];
}
*/
}
}

View File

@ -25,25 +25,6 @@ namespace ln.types.rpc
Exception = e;
ErrorText = e.ToString();
}
/*
public JObject ToJSON()
{
JObject result = new JObject();
result["id"] = JToken.FromObject(Identifier);
if (ErrorText != null)
{
result["error"] = new JObject();
result["error"]["message"] = JToken.FromObject(ErrorText);
result["error"]["exception"] = JToken.FromObject(Exception);
}
else
{
result["result"] = JToken.FromObject(Result);
}
return result;
}
*/
}
}