12

Serialization of anonymous paid cart DTO to JSON text.

 3 years ago
source link: https://gist.github.com/einarwh/a09410f1b3004b1b7dfe34a51e6b8010
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Serialization of anonymous paid cart DTO to JSON text. · GitHub

Instantly share code, notes, and snippets.

Serialization of anonymous paid cart DTO to JSON text.

var paidCartAnon = new { _state = "paid", paidItems = new object[] { new { id = "1bcd", title = "gizmo" }, new { id = "3cdf", title = "widget", description = "A very useful item" } }, payment = new { mount = 123.5, currency = "USD" }, timestamp = "2020-04-11T10:11:33.514+02:00" };

var paidCartAnonJsonText = JsonConvert.SerializeObject(paidCartAnon);


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK