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.
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
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
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.
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"
}
but my json data is in text only now how to convert
1. Download a dependency from BinaryData.
2. Use 'BinaryToText' function.
3. JSON Deserialize if you want back the JSON