private static string GetSerializedTransaction() { var transaction = Initialize.GetTransaction(); string json = JsonSerializer.Serialize(transaction); return(json); }
private static void SerializeSample() { var transaction = Initialize.GetTransaction(); string json = JsonSerializer.Serialize(transaction); transaction = JsonSerializer.Deserialize <object>(json); }
private static void SerializeIdentedJSON() { List <Order> orders = Initialize.InitOrders(); var options = new JsonSerializerOptions() { WriteIndented = true }; string json = JsonSerializer.Serialize(orders, options); Console.WriteLine(json); }