using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public double MyNumber { get; set; }
public static void Test()
var myObject = new MyClass { MyNumber = 1234567890123456789.0 };
var settings = new JsonSerializerSettings
FloatFormatHandling = FloatFormatHandling.String,
DoubleFormatHandling = DoubleFormatHandling.String
var json = JsonConvert.SerializeObject(myObject, Formatting.None, settings);
public static void Main()
Console.WriteLine("Environment version: {0} ({1}), {2}", System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription , Environment.Version, Environment.OSVersion);
Console.WriteLine("{0} version: {1}", typeof(JsonSerializer).Namespace, typeof(JsonSerializer).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");