There is currently a bug in the latest version of ardoJSON (v1.10.10) in which the OutSystems2JSON Action does not serialize anonymous structures correctly.
Example:
After assigning "FooBar" to MyStructure.AnonymousStructure.Text and appending "FooBar" to MyStructure.AnonymousStructureList, this is the output:
{"AnonymousStructure":{},"AnonymousStructureList":[{}]}
After troubleshooting the .NET code, I found that the writeRecord method is incorrectly redefining the leClass variable while parsing the attributes of anonymous structures, which are derived from ValueType type. Adding the following to this 'if' fixes it.
Here's the new output after this fix:
{"AnonymousStructure":{"Text":"FooBar"},"AnonymousStructureList":[{"Text":"FooBar"}]}
I've attached a sample module that reproduces the issue, as well as the fixed XIF. Would appreciate considering publishing a patch with this fix.
Thanks.
Hi @Caio Santana Magalhães ,
Thank you for reporting the issue and providing the solution.I've just released version 1.11.0 which should fix this issue.Regards,