woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
301 stars 109 forks source link

[Custom Fields] Allow differentiating between JSON fields and String fields that contain JSON content #14271

Open hichamboushaba opened 4 hours ago

hichamboushaba commented 4 hours ago

Currently, the iOS implementation differs from how Android and Core behave: both Android and Core will allow editing JSON values that are wrapped as Strings, something like:

{
   "id": 1,
   "key": "key",
   "value": "{\"key\":\"value\"}"
}

But for iOS, and given that we don't differentiate between the different forms of MetaData values, the above will be exactly the same as if we received:

{
   "id": 1,
   "key": "key",
   "value": {"key":"value"}
}

This means that the String fields that contain JSON are not editable on the iOS app.

dangermattic commented 4 hours ago

Thanks for reporting! 👍