Skip to content

Order Metadata JsonValue Causes Failure if an array #1230

Description

@nramsey

The MetaData class property jsonValue is set to be a string? which, if it is an array in the actual data, causes an exception. If this value was System.Text.Json.JsonDocument? instead it would parse properly.

Example real world data that would cause the issue

 "metafields": {
                            "nodes": [
                                {
                                    "id": "gid://shopify/Metafield/44095900025121",
                                    "key": "custom",
                                    "value": "true",
                                    "jsonValue": "true",
                                    "createdAt": "2026-01-08T09:10:26Z"
                                },
                                {
                                    "id": "gid://shopify/Metafield/44095900582177",
                                    "key": "paths",
                                    "value": "[{\"line_item_id\":\"gid://shopify/LineItem/16704025788705\",\"left\":\"6938332365089/lineitem_16704025788705_left.stl\",\"right\":\"6938332365089/lineitem_16704025788705_right.stl\",\"uid\":\"SF26DO7VC0QU\"}]",
                                    "jsonValue": [
                                        {
                                            "line_item_id": "gid://shopify/LineItem/16704025788705",
                                            "left": "6938332365089/lineitem_16704025788705_left.stl",
                                            "right": "6938332365089/lineitem_16704025788705_right.stl",
                                            "uid": "SF26DO7VC0QU"
                                        }
                                    ],
                                    "createdAt": "2026-01-08T09:10:40Z"
                                },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions