Describe the bug
Serializing double value to JSON using Swan.Formatters.Json class sometimes results in string in exponential form.
To Reproduce
using Swan.Formatters;
using System.Text.Json;
List<double> doubleValues = [1, 5e-5];
var swanRes = Json.Serialize(doubleValues);
var textJsonRes = JsonSerializer.Serialize(doubleValues);
Console.WriteLine($"SWAN: {swanRes}");
Console.WriteLine($"Text.Json: {textJsonRes}");
results in
SWAN: [1,"5E-05"]
Text.Json: [1,5E-05]
Expected behavior
SWAN: [1,5E-05]
Text.Json: [1,5E-05]
Additional Info
Using package Unosquare.Swan.Lite, version 3.1.0
Describe the bug
Serializing
doublevalue to JSON usingSwan.Formatters.Jsonclass sometimes results in string in exponential form.To Reproduce
results in
Expected behavior
Additional Info
Using package
Unosquare.Swan.Lite, version3.1.0