Shopify / mobile-buy-sdk-android

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.
MIT License
212 stars 136 forks source link

response data in json #688

Open blob84 opened 3 years ago

blob84 commented 3 years ago

Hello how to get response data in json format or convert object in json format? Is there a method that accomplish that?

Thanks.

bourne-ag4in commented 1 year ago

Upon making a call to a product page with the expectation of response type of 'application/json' you must end your page request with '.js' or '.json' and return the default JSON object for that product.

Alternatively if you want to convert an object to json request it without the json type to retrieve the contents of your custom page as plain text, then use JSON.parse to convert the response data into a json usable object.