Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Youssef Boukenken
0
Views
0
Comments
Serialize Complex / Compound record list?
Question
Forge
Hello,
We've been using the ardoJSON component to serialize record lists to JSON for consumption via REST. However, it seems that it cannot serialize compound record lists (where the type consists of more than one structure/entity). When serialized, it ignores all but the first type in the compound record list, as if it were a simple type.
What's up with that? Is there a work around for this issue?
Here is an example:
I've defined a Person structure with a name field, and a record-list called location with the type (Address, Coordinates).
Then I create a temporary variable the Location record-list, assign some values, append it to the Person.Location recordlist, cast it to an object, send it to OutsystemsToJSON, then return the JSON for download to the client.
This is the output from the above. Note that the only data serialized from Location is the Address record type, not Coordinates.
{"Name":"Box Barker","Location":[{"Line1":"123 Address Line 1","Line2":"Apt 123"}]}
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
 Loading...