metadata problem


The json i recieve is;
    "id": 0,
    "method": "mining.subscribe",
    "params": [
json-rpc.net throws an exception in handler.cs;
        if (isJArray)
            var jarr = ((Newtonsoft.Json.Linq.JArray)Rpc.Params);
            //var loopCt = jarr.Count;
            //var pCount = loopCt;
            //if (pCount == metaDataParamCount - 1 && metadata.parameters[metaDataParamCount].GetType() == typeof(JsonRpcException))
            //    pCount++;
            //parameters = new object[pCount];
            for (int i = 0; i < loopCt; i++)
                 parameters[i] = CleanUpParameter(jarr[i], metadata.parameters[i]);                    

An exception of type 'System.IndexOutOfRangeException' occurred in AustinHarris.JsonRpc.dll but was not handled in user code.

Any ideas?
Closed Dec 9, 2013 at 6:23 PM by AustinHarris
Issue was resolved because changing the method signature to allow it to take a single string parameter caused it to function correctly.


AustinHarris wrote Dec 6, 2013 at 7:04 PM

I'm assuming you have this mapped to a function that takes a single string parameter?

Could you post your C# method signature that this is supposed to be bound to?

raistlinthewiz wrote Dec 7, 2013 at 8:16 PM

Thanks, issue was related to the parameter as you stated.

wrote Dec 9, 2013 at 6:23 PM