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 fromJsonBytesWithType to lang.value #657

Open
jclark opened this issue Nov 24, 2020 · 0 comments
Open

Add fromJsonBytesWithType to lang.value #657

jclark opened this issue Nov 24, 2020 · 0 comments
Assignees
Labels
enhancement Enhancement to language design langlib Relates to lang.* libraries
Milestone

Comments

@jclark
Copy link
Collaborator

jclark commented Nov 24, 2020

Might be useful to add

public isolated function fromJsonBytesWithType(byte[] bytes, typedesc<anydata> t = <>)
    returns t|error = external;

to lang.value. This would be a combo of string:fromBytes and value:fromJsonStringWithType except that it should support (and automatically recognize) UTF-16 and UTF-32, which, together with UTF-8 are the only encodings of JSON allowed by RFC7159.

@jclark jclark self-assigned this Nov 24, 2020
@jclark jclark added langlib Relates to lang.* libraries enhancement Enhancement to language design labels Nov 24, 2020
@jclark jclark added this to the Later milestone Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to language design langlib Relates to lang.* libraries
Projects
None yet
Development

No branches or pull requests

1 participant