Hi
I'am using products admin API to get the products data. I will get the price element inside variants in the form of string. can i get the price value in the form of float or integer.
Hey Josh,
Can I kindly ask why monetary types are typed as strings in the API to begin with?
There may be a very valid reason, but still, that design choice can't help but have new Shopify developers feel concerned. More so since the doc doesn't give a single clue about it. No explanations, no parsing rules, no nothing.
Does my app have to expect non-numerical string values at some point? Must I expect different decimal separator characters depending on some settings? Or user preference?
What's the deal here?
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |