How to Download data of an Entity in Json format

Hi,

      How to Download data of an Entity in json format.


Thanks,

R.karthik

   

Hello Karthik,

Since version 10 you have the JSON statements (available in logic), that take a list and return the JSON.
Just create an aggregate to fetch your data and pass the returned list to the JSON Serialize statement.

Cheers.

A way to do this is to write a REST-webservice that expose a list of records in JSON-format.

Other way is to write an action that creates a list of records and then use the JSONSerialize action.

Inside logic You have this:


You only need to create an aggregate or a SQL Advanced query to fech the data and pass the output list to the JSON Serialize statement.

Hi,

In the download it is showing error in the file content data type, the datatype should be binary data but json is of text datatype.

Thanks,

Ronan  T


Hi Ronan,

Change the binaryData to Text.



Rajendra Singh

There's a system extension called BinaryData that contains actions that convert text to binary and vice-versa.

Hi Ronan T,

I am correct , then you need json data in text file on download.

If yes then as João Pedro Abreu  add the extension search for BinaryData -> and add TextToBinaryData  function .On downloading the json , named the export file in text extension format . For eg : Sample.txt.

Please find the sample oml in the attachment.

Happy Coding.  :)

Pranav Pandey wrote:

Hi Ronan T,

I am correct , then you need json data in text file on download.

If yes then as João Pedro Abreu  add the extension search for BinaryData -> and add TextToBinaryData  function .On downloading the json , named the export file in text extension format . For eg : Sample.txt.

Please find the sample oml in the attachment.

Happy Coding.  :)

Hi Pranav Pandey,

Thanks ,it is working fine




Ronan T wrote:

Pranav Pandey wrote:

Hi Ronan T,

I am correct , then you need json data in text file on download.

If yes then as João Pedro Abreu  add the extension search for BinaryData -> and add TextToBinaryData  function .On downloading the json , named the export file in text extension format . For eg : Sample.txt.

Please find the sample oml in the attachment.

Happy Coding.  :)

Hi Pranav Pandey,

Thanks ,it is working fine




Great . If that worked, then you can mark it a solution.. :)