Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Serialization of paid cart DTO v2 to JSON text.
var paidCartDto2 = new PaidCart
{
PaidItems = new Item[] {
new Item {
Id = "1bcd",
Title = "gizmo"
},
new Item {
Id = "3cdf",
Title = "widget",
Description = "A very useful item"
}
},
Payment = new Money {
Mount = 123.5,
Currency = "USD"
},
Timestamp = "2020-04-11T10:11:33.514+02:00"
};
var paidCartDto2JsonText = JsonConvert.SerializeObject(paidCartDto2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment