voylinux Posted August 5, 2014 Share Posted August 5, 2014 (edited) I am developing a module that will override some PS Webservice functionality and I am trying to guess how to make it return a JSON response. I can see a some lines in PS WebserviceRequestCore that say: $this->outputFormat = isset($params['output_format']) ? $params['output_format'] : $this->outputFormat; // Set the render object to build the output on the asked format (XML, JSON, CSV, ...) $this->objOutput->setObjectRender($this->getOutputObject($this->outputFormat)); But don't understand if this really works and how to make it arrive in the request. Edited August 5, 2014 by voylinux (see edit history) Link to comment Share on other sites More sharing options...
voylinux Posted August 5, 2014 Author Share Posted August 5, 2014 This is not working for me in Prestashop 1.5. It does return XML even including that parameter. Link to comment Share on other sites More sharing options...
voylinux Posted August 5, 2014 Author Share Posted August 5, 2014 Not sure that I can upgrade the whole shop. Do you know if I can just upgrade the webservice? Link to comment Share on other sites More sharing options...
voylinux Posted August 5, 2014 Author Share Posted August 5, 2014 Thank you. I will try and let you know how it was. Link to comment Share on other sites More sharing options...
xabikip Posted February 6, 2015 Share Posted February 6, 2015 Hello, Can you get to work with JSON format? Any finding? Link to comment Share on other sites More sharing options...
Nikhil.nj Posted March 30, 2015 Share Posted March 30, 2015 Just pass the parameter with the url like www.abcshop.com/api/customers/1/output_format=JSON and default it return in xml format Hope will be helpful Nikhil ['} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now