shopifyFD icon indicating copy to clipboard operation
shopifyFD copied to clipboard

json_string metafields and changes to them

Open resistorsoftware opened this issue 5 years ago • 0 comments

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?

resistorsoftware avatar May 23 '19 18:05 resistorsoftware