create XML from JSON responce (4 posts)

  1. deepak.ghayal
    Posted 2 years ago #

    Hi, I am new to wordpress..
    Your plugin is works great, I just want ask we create XML by json responce. Means when I call http://example.com/api/user/get_userinfo/?user_id=1 then I get following responce {"status":"ok","id":1,"username":"admin","nicename":"admin","email":"deepak.ghayal@mediawide.com","url":"","displayname":"admin","firstname":"","lastname":"","nickname":"admin","avatar":null}

    It's great,
    But I want In Xml Format or Create XML of above response like this:
    So can how can we create?


  2. TomekR
    Posted 2 years ago #

    Hi Deepak,
    Not answering directly to your question, but...

    I don't expect the plugin to respond in xml format, as even by name it is json :-). Also, this format is typical for REST services.
    So instead, you should deserizalize it on your side and serialize to xml, if you need xml.

  3. deepak.ghayal
    Posted 2 years ago #

    Thanks TomekR,
    I know that json is work great I appreciate it. Bcoz I also use same plugin for REST request it work Great.....
    My question is If I change json-api-user plugin's file json-api-user/controllers/User.php and in it change get_userinfo() function, can if affect to other services like retrieve_password, or json api plugin code...

  4. bobblah
    Posted 2 years ago #

    I can't answer your last question but I can tell you that in the past I was able to write some code in functions.php which created and updated an XML file every time a specific custom post type was added or edited. I'm not a coding expert but it wasn't that hard to do. So you may be better off searching for a solution like that instead of trying to modify this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.