[ardoJSON] record conversion issue

[ardoJSON] record conversion issue

  
Forge Component
(20)
Published on 30 Aug (4 weeks ago) by Ricardo Silva
20 votes
Published on 30 Aug (4 weeks ago) by Ricardo Silva
Hi,
I'm using ardoJSON's 1.9, I am trying to convert the JSON to record.
However, it does not go well.
 
Record is made up of two entities.
In other words, the data type, such as the following.
  Entity1, Entity2 Record
 
The structure with the attributes of this data type and defined as follows.
Structure1
   Attribute1(DataType:Entity1, Entity2 Record)
 
Convert the following JSON data in this structure.
{
    "Attribute1": {
        "Entity1": {
            "Id": 123, 
            "EntityAttribute":"Entity1"
        }, 
        "Entity2": {
            "Id": 456, 
            "EntityAttribute":"Entity2"
        }
    }
}
 
Argument of JSON2RecordList was set as follows.
  JSON:[The above JSON]
  RecordList:ToObject([List of the above Structure1])
 
However, the value of record of the structure all has become Null.
How can I convert the JSON to the record?
 
Hi Kenta,

I'm pretty sure that the component documentation says that scenario (records with more than one entity) are not supported by design.

You can create a a structure with 2 attributes Entity1 and Entity2 and achieve the same result.

Regards,
João Rosado
Hi João,
 
Thank you for your quick reply.
I understand about ardoJSON does not support this scenario.
I'll try in a way that you say.
Thank you very much for answer and advice you gave me.