WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Feature request: filter hook for after json encode (2 posts)

  1. Austen Blokker
    Member
    Posted 12 months ago #

    I'm using the JSON API with WP Super Cache. Super Cache needs the generated file to end with '</html>' in order to recognize the end of the file and cache the page. I modified the JSON API plugin to add '//</HTML>' to the end of the JSON string, and then used a filter on WP Super Cache to remove the '//</HTML>' after caching so the JSON string remains unmodified. It works great, my JSON data loads super fast now!

    I'd prefer if I could use a filter to modify the JSON string rather than hacking the plugin, so my changes don't get overwritten on plugin updates. Thanks for an awesome plugin.

    http://wordpress.org/plugins/json-api/

  2. Bob Gregor
    Member
    Posted 10 months ago #

    Do you know if WP Super Cache uses the object caching API? If it supports wp_cache_set & wp_cache_get, then we can make JSON API support super cache & all the other caching plugins.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.