Added mapping for System.SByte
ln.build - build0.waldrennach.l--n.de build job pending Details

master 1.0.5
Harald Wolff 2020-12-18 15:49:05 +01:00
parent a6757e1b63
commit 492e232fa7
2 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
<Authors>Harald Wolff-Thobaben</Authors>
<Company>l--n.de</Company>
<Product>ln.json</Product>

View File

@ -261,6 +261,11 @@ namespace ln.json.mapping
(JSONMapper arg1, object arg2) => new JSONNumber((int)(byte)arg2),
(JSONMapper arg1, JSONValue arg2) => Decimal.ToByte(((JSONNumber)arg2).Decimal)
));
DefaultMapper.Add(new JSONMapping(
typeof(sbyte),
(JSONMapper arg1, object arg2) => new JSONNumber((int)(sbyte)arg2),
(JSONMapper arg1, JSONValue arg2) => Decimal.ToSByte(((JSONNumber)arg2).Decimal)
));
DefaultMapper.Add(new JSONMapping(
typeof(short),
(JSONMapper arg1, object arg2) => new JSONNumber((int)(short)arg2),