ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Improve the `toJson` function to overwrite json property with the given name #7004

Closed lnash94 closed 1 month ago

lnash94 commented 2 months ago

Description: Currently, the tool uses the @jsondata:Name annotation to overwrite the record name with the given JSON property name when using the parseAsType method. This issue aims to implement the same annotation usage in the toJson function to overwrite the given property name with the corresponding JSON property.

This feature improvement is required this proposal : https://github.com/ballerina-platform/ballerina-library/issues/6747