22 lines
621 B
C#
22 lines
621 B
C#
using System.Globalization;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace TrajectoryPlanningVisualization;
|
|
|
|
public static class VisualizationJson
|
|
{
|
|
private static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
|
|
{
|
|
ContractResolver = new CamelCasePropertyNamesContractResolver(),
|
|
Culture = CultureInfo.InvariantCulture,
|
|
DateFormatHandling = DateFormatHandling.IsoDateFormat,
|
|
Formatting = Formatting.None
|
|
};
|
|
|
|
public static string Serialize(object value)
|
|
{
|
|
return JsonConvert.SerializeObject(value, Settings);
|
|
}
|
|
}
|