Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shopify Json construction before sending on the wire
I need to construct the following JSON in C#, it will be sent on the wire afterwards:
{
"custom_collection": {
"title": "IPods",
"collects": [
{
"product_id": 921728736
}
]
}
}
1. What is the most performant way to construct this?
2. How can one compose this with anonymous type construction? I had problem with the underscore separator within the key.
I'd like to avoid define all the "wrapper" classes with JsonProperty for the whole shopify API if possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment