Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for binding JSON payloads to a Ballerina record in the Copybook module #6940

Open
MohamedSabthar opened this issue Aug 28, 2024 · 1 comment

Comments

@MohamedSabthar
Copy link
Member

Description:
In the future, we need to support an API that directly binds the value produced by the fromBytes() method to a Ballerina record type and performs constraint validation. We could introduce a similar API as shown below:

public isolated function fromBytesWithType(byte[] bytes, string? targetRecordName = (),
   Encoding encoding = ASCII,  typedesc<record{}> targetType = <>) returns targetType|Error;

Describe your problem(s)

Describe your solution(s)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: BackLog
Development

No branches or pull requests

2 participants
@MohamedSabthar and others