From ddef1ef16e83724ef2109270a61eaf00fe68dcfc Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Sat, 9 Dec 2017 14:30:26 +0100 Subject: [PATCH] Fix Integer Type conversions --- JSONConverter.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 },