JSON Export - Joomla Extension






Buy Now!

JSON Export is a Joomla® extension that lets you expose your database tables to the outside using JSON, from the frontend of the site.

Major advantages provided are:

  1. you can choose which tables you want to expose from the admin interface: just pick the ones you need
  2. you can add a password to protect your data, so only you can access it
  3. you can select all fields (*), or just some fields to limit the columns in the output
  4. you can set LIMIT and OFFSET parameters to the query URL to limit the size of the data: useful for big tables

The results are sent using JSON to the requester.


You can also use it to export to JSON the result of any database query you want to execute, by creating Views on your database via phpMyAdmin.



How to use

You enable the table to be exported from the Admin interface, then you must call the frontend of the site with a query URL, like:

your-joomla-site.com/index.php?option=com_jsonexport&table=mlyzd_viewlevels&fields[]=id,title&limit=10&offset=20

The URL parameters you can add the the JSON query are:

  • table (required): defines the name of the table you want to export. Use the export_table parameter instead of table if you want to add this URL to an "External URL" Joomla menu item, to prevent errors.
  • fields (optional): defines one or more fields you want to export. If you want to export everything, don't add this parameter.
  • limit (optional): limits the query to a value
  • offset (optional): starts the query with the specified offset


The latest 2 are useful when you need to export a lot of data, so you can do it in chunks.

Some examples of links you can build:

your-joomla-site.com/index.php?option=com_jsonexport&table=o29t1_content

your-joomla-site.com/index.php?option=com_jsonexport&table=o29t1_content&fields[]=id,title&limit=1 (limit to 1, only list id and title)

your-joomla-site.com/index.php?option=com_jsonexport&table=o29t1_content&limit=1&offset=3 (start with an offset)

your-joomla-site.com/index.php?option=com_jsonexport&table=o29t1_categories (shouldn't work, it's not enabled - unless another user enabled it. Try enabling/disabling it from the admin interface)

your-joomla-site.com/index.php?option=com_jsonexport&table=o29t1_content&username=x&password=y (try enabling the authentication, or changing username / password)

If in the settings you enable password protection of the JSON file, you can use the username and password parameters, setting them to the corresponding values you have defined in the settings.

You can also use it to export to JSON the result of any database query you want to execute, by creating Views on your database via phpMyAdmin (see http://www.mysqltutorial.org/create-sql-views-mysql.aspx)