MSA.Zmq.JsonRpc.JsonRpcResponse.CreateJsonResponse C# (CSharp) Метод

CreateJsonResponse() публичный статический Метод

public static CreateJsonResponse ( int id, Object result ) : string
id int
result Object
Результат string
        public static string CreateJsonResponse(int id, Object result)
        {
            var resp = new JsonRpcResponse();
            resp.JsonRpc = "2.0";
            resp.Id = id;
            resp.Error = null;
            resp.Result = result;

            var jsonSettings = new JsonSerializerSettings();
            jsonSettings.NullValueHandling = NullValueHandling.Ignore;

            return JsonConvert.SerializeObject(resp, Formatting.Indented, jsonSettings);
        }