1

enter image description hereI started using the JSON API plugin. It works good ! But the problem i am facing is, If i enter any text containing special characters through CMS The output is not same as the given text. Why this is happening?

Example: It's a good app (Input) The output looks like It ' s a good app. Please suggest any tips/methods to get rid of this situation.

Eagerly waiting for your response. Thank you

  • What is the difference between "It's a good app" (input) and "It's a good app" (output)? I see none. – Miha Rekar Oct 9 '12 at 14:10
  • Please check , I have edited my question as shown in image. but stackoverflow displayed special character '. And this(stackoverflow scenario ) is what i want. – Rama raju dantuluri Oct 9 '12 at 14:29
  • Some degree encoding is always required. Otherwise how would you, for example, send JSON string (as part of post or something) in JSON? It would break horribly without encoding special characters. This is matter of properly decoding JSON data in your client application, not a problem with data output. – Rarst Oct 9 '12 at 22:45
3

That's probably because the "JSON API plugin" htmlescapes your text. So if you would just display it on site it should print OK, but if you need to work with it on the backend than just use html_entity_decode()

| improve this answer | |
  • I am not displaying data on my site. I want the webservice to be used by an ios developer. Any settings to be made in this plugin so that i can modify accordingly. Ya i am familiar with html_entity_decode() when coding in php. As it is a word press site how can i implement. I am new to wordpress custom coding. – Rama raju dantuluri Oct 9 '12 at 14:33
  • Then your iOS developer has to solve this. Have him look at this: stackoverflow.com/questions/659602/… – Miha Rekar Oct 9 '12 at 14:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.