Forum Discussion
KaelaC
14 years agoLithium Alumni (Retired)
Yes, the REST API can return json instead of xml. Just put
?xslt=json.xsl
at the end of your rest call. For example:
http://lithosphere.lithium.com/restapi/vc/threads/recent?xslt=json.xsl
You can also use ?xslt=json-v2.xsl instead. This will force all values to be returned in quotes. Useful if you have number strings that you don't want js to turn into numerical values.
?xslt=json.xsl
at the end of your rest call. For example:
http://lithosphere.lithium.com/restapi/vc/threads/recent?xslt=json.xsl
You can also use ?xslt=json-v2.xsl instead. This will force all values to be returned in quotes. Useful if you have number strings that you don't want js to turn into numerical values.
Sign in to react to this post