Open DaAlbrecht opened 3 months ago
As a workaround you can use
public type PayloadAnyType record {|
@xmldata:Attribute
string 'version?;
string 'type?;
json...;
|};
as expected type.
As a workaround you can use
public type PayloadAnyType record {| @xmldata:Attribute string 'version?; string 'type?; json...; |};
as expected type.
I want explicitly an open record sadly, so this does not work.
@DaAlbrecht It is an open record, but instead of open to anydata
it is open to json
. Do you have a requirement to use non-json values in the record?
Another option is
PayloadAnyType data = check xmldata:parseAsType(<map<json>>xmlData.toJson());
As a workaround you can use
public type PayloadAnyType record {| @xmldata:Attribute string 'version?; string 'type?; json...; |};
as expected type.
Sorry for the late reply, this does work as a workaround thank you!
Description:
Deserialization of a custom open Record back to XML fails.
Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Linux, MacOS