• Is there a way I can just echo out a JSON string and nothing else from a query parameter or using some sort of custom action?

    I know actions work by hooking into predefined wp named events or by initiating do_action() from a template. I just want to select some stuff from the database using the $wpdb object and then parse out some JSON..

    Any advice appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dyerrington

    (@xgote)

    Also, I’m wanting to use my already developed JSON class, not the one that comes with WordPress..

    Thread Starter dyerrington

    (@xgote)

    WordPress is a pain in the ass.. I am going to use PEAR MDB2 and save myself the headache of duct taping this solution. I created a page, applied a custom template to it, bound an action then executed it within the template. The performance was awful, maxing out at less then 20 concurrent requests when I tested under load.

    I can write a simple class that connects to a database, selects WP data then have a few methods to display what to output and encode to JSON in less then 30 minutes of development. All while supporting a high number of requests (without caching).

    Problem solved! Thanks me!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displaying JSON.. how?’ is closed to new replies.