Skip to content

json_string metafields and changes to them #95

@resistorsoftware

Description

@resistorsoftware

Assume a Metafield resource of type json_string exists attached to a product, and one then uses Liquid to deserialize the json_string value in a theme. All is well!

If you fire up ShopifyFD version 0.0.6 in Chrome and then examine the JSON string, one can change a key or value in the JSON string. So we change a 6 to a 4. Hit save.

Now the Metafield resource is saved but it has a type of String. A refresh on the browser with the same product, reveals that the deserialization of the JSON string is now a no go, and therefore all that nice logic is borked.

Why does the update change the value type from json_string to just string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions