Title: json_encode not working well
Last modified: August 31, 2016

---

# json_encode not working well

 *  [Nicolas Juen](https://wordpress.org/support/users/rahe/)
 * (@rahe)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/json_encode-not-working-well/)
 * Hello,
 * In the file php/loco-ajax.php you need to replace json_encode by wp_json_encode
   for having a good return.
    In soma cases the translations are not returned right.
   Thank you 🙂
 * [https://wordpress.org/plugins/loco-translate/](https://wordpress.org/plugins/loco-translate/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/json_encode-not-working-well/#post-7069349)
 * I’ll bear that in mind as I’m working on version 2.0.
 * However, what particularly is wrong with the data returned?

Viewing 1 replies (of 1 total)

The topic ‘json_encode not working well’ is closed to new replies.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/json_encode-not-working-well/#post-7069349)
 * Status: not resolved