diff --git a/JSONConverter.cs b/JSONConverter.cs index 69a4047..7831493 100644 --- a/JSONConverter.cs +++ b/JSONConverter.cs @@ -12,12 +12,12 @@ namespace sharp.json static Dictionary toDelegates = new Dictionary{ { typeof(string), (t, json) => json.String }, - { typeof(int), (t, json) => json.Integer }, - { typeof(short), (t, json) => json.Integer }, + { typeof(int), (t, json) => (int)json.Integer }, + { typeof(short), (t, json) => (short)json.Integer }, { typeof(long), (t, json) => json.Integer }, - { typeof(uint), (t, json) => json.Integer }, - { typeof(ushort), (t, json) => json.Integer }, - { typeof(ulong), (t, json) => json.Integer }, + { typeof(uint), (t, json) => (uint)json.Integer }, + { typeof(ushort), (t, json) => (ushort)json.Integer }, + { typeof(ulong), (t, json) => (ulong)json.Integer }, { typeof(double), (t, json) => json.Double }, { typeof(float), (t, json) => json.Double }, { typeof(bool), (t, json) => json.Boolean },