Int64 and Byte

Jan 9, 2012 at 7:41 PM

Hi all,
I have in input this json:

{"param1":1}

I have this .Net Class:

public class InputParams
{
    public Object param1;
}

When i try to convert this JSON in InputParams class, i see that param1 was converted in Int64:
but is only a number, but for "1" I aspect that was converted as BYTE.

{"param1":1000}

When i try to convert this, i receive INT64, but is only a Int16.

Can anyone tell me how i can customize the parameters conversion process?

I need to work with reflections, so i need to send at myMethodInfo.Invoke the correct type
but the JsonConvert send wrong value.

Darez