Fix writing json numeric values

Working on #115
This commit is contained in:
Frank A. Krueger 2018-03-23 16:01:16 -07:00
parent 7522fe0ce5
commit 2eafc04615
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
1 changed files with 3 additions and 0 deletions

View File

@ -76,14 +76,17 @@ namespace Ooui
if (value is double) { if (value is double) {
w.Write (((double)value).ToString (icult)); w.Write (((double)value).ToString (icult));
return;
} }
if (value is int) { if (value is int) {
w.Write (((int)value).ToString (icult)); w.Write (((int)value).ToString (icult));
return;
} }
if (value is float) { if (value is float) {
w.Write (((float)value).ToString (icult)); w.Write (((float)value).ToString (icult));
return;
} }
w.Write (Newtonsoft.Json.JsonConvert.SerializeObject (value)); w.Write (Newtonsoft.Json.JsonConvert.SerializeObject (value));