Last active
May 13, 2020 17:52
-
-
Save einarwh/afba5ff3e2ba244fc4de4499f2261704 to your computer and use it in GitHub Desktop.
Serializing paid cart DTO variation 1 as JSON text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var paidCartDto1 = 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 paidCartDto1JsonText = JsonConvert.SerializeObject(paidCartDto1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment