Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

closed as off topic by Rarst Oct 9 '12 at 22:45

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 3 down vote accepted

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()

share|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
    
Yes it worked. Thank's for your support –  Rama raju dantuluri Oct 15 '12 at 10:04
add comment

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