How to export 'Content-Type' data into JSON? I'm using Drupal 7 and I've created a content type as 'CONTENT_TABLE', which includes multiple fields (COLUMNS) as such: CONTENT_ID, CONTENT_NAME, LARGE_THUMBNAIL, ZIP_FILE...

I want to export the data (each row of the table) into a JSON. I need to use this JSON as an input for another website. 

I have tried to look for Node export module, but I'm not sure how to export the data into JSON which can be used as is. 

Expected JSON:

{
   "ContentItems": [
      {
         "CONTENT_ID": "123",
         "CONTENT_NAME": "ABC",
         "LARGE_THUMBNAIL": "C:/LargeThumbnail/ABC.jpg",
         "ZIP_FILE": "C:/LargeThumbnail/ABC.zip"
      },
      {
         "CONTENT_ID": "234",
         "CONTENT_NAME": "PQR",
         "LARGE_THUMBNAIL": "C:/LargeThumbnail/PQR.jpg",
         "ZIP_FILE": "C:/LargeThumbnail/PQR.zip"
      }
   ]
}
You could use the Forena module (disclosure: I'm a co-maintainer of it) as your 1-stop-solution (using only 1 contributed module) to:


Build your custom query to fetch the data, whereas these data can be retrieved directly from your Drupal database. Obviously, in this case it's be an SQL to retrieve your CONTENT_ID, CONTENT_NAME, LARGE_THUMBNAIL, ZIP_FILE ...
Format the look and feel of your results (the report) using xHTML (and/or charts if you'd like).
Download the results in any of the typical formats, such as PDF, XLS, CSV, XML, JSON, etc. For any report that you create (using Forena), just add .csv as an extension to the report (output) URL. That contains the CSV equivalent of that report (similar for the other formats).


Example

As a sample, consider the sample report located at /reports/sample.states in your own site (one of the samples shipped with Forena) or in the Simple Table of States in the demo site. Change the URL to /reports/sample.states.csv (= just add .csv to it) to get the same report in .csv format. By adding such .csv to the URL, the result is like so ...

Same technique applies for other supported extensions (export formats), such as:


the PDF version.
the HTML version.
the XLS (MS Excell) version.
the DOC (MS Word) version.
... there are more.


Remark: when building a report, you can also specify for which of these Document Types an hyperlink should be made available in the report.

Direct access to data blocks

All data blocks are also accessible directly via their url, provided you have permission to access that block. Here are a few samples of that (from the demo site), for the sample report located at /reports/sample.states:


in JSON format.
in XML format.


More info


To get an idea how its Custom Queries (SQLs) and/or Report Specifications look like, refer to the example in my answer to "How to retrieve data directly from a Drupal database".
The Forena Video demos and tutorials contain quite some links to live demos.


Getting started


To actually install/configure Forena, make sure to look at the various steps in the Setup Guide that comes with it, which you can find at /reports/help.setup in your own site also after you enabled Forena (similar to what you can see in the demo site). Missing (forgotten) "permissions" and/or "text formats" configurations (if you don't follow the Setup Guide) or the most common showstoppers if you"re new to Forena ...
If you run into "PDO driver support for sqlite not installed", then head over to comment nr 7 in issue #1061436. Here is a summary of it: you only need that for using the "sample database" (the one you can also see in the demo site), which is delivered in SQLite format. So you can use Forena without that support, eg to access your own Drupal database (in MySql fmt). And/or you might want to look at the "drupal admin samples" instead ...