Fix Integer Type conversions

master
Harald Wolff 2017-12-09 14:30:26 +01:00
parent 2cb115f1f2
commit ddef1ef16e
1 changed files with 5 additions and 5 deletions

View File

@ -12,12 +12,12 @@ namespace sharp.json
static Dictionary<Type, ConvertToDelegate> toDelegates = new Dictionary<Type, ConvertToDelegate>{
{ 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 },