757
Views
6
Comments
How to load JSON file's data into an entity
Application Type
Reactive
Service Studio Version
11.12.1 (Build 49734)

I have a JSON file and I want to load it's data to an entity so that I can use that entity in Exposing an API. 

And after that I need to Consume that exposed API for iterating it's response using for each loop.

2025-04-22 05-54-18
Shashi Kant Shukla

Hi Ajay,

You can use JSON Deserialize  https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/JSON_Deserialize  to convert JSON to record list and you can easily store JSON data to entity.


Regards

Shashikant Shukla


2020-11-13 07-48-15
Khuong Truong

Hi,

You can search on the forums first (like this). 

I found this post has detail how to create structure from JSON then you can play with it using Json Deserialize. 

If you want to use entity, you can easily create a new entity then copy all attributes from the structure and paste into new entity.

Cheers,

Khuong

2020-11-13 07-48-15
Khuong Truong

Hi again,

In case you don't see these JSON functions, try to open any Client Actions or Server Actions and you will see them on the left side.

2023-12-14 09-56-57
Yogesh Javir

Hi Ajay,
Please find attachment oml.
you have to use Json Deserialize to convert json string to object, then only you can do CRUD on data

Used json sample 

{

    "fruit": "Apple",

    "size": "Large",

    "color": "Red"

}

Forum.oml
UserImage.jpg
Pydisetti sai

but my json data is in text only now how to convert


2025-09-09 09-52-32
Bala Subramanian

1. Download a dependency from BinaryData.

2. Use 'BinaryToText' function.

3. JSON Deserialize if you want back the JSON

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.