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 wrapper functions for JSON Built-in functions in package space #5447

Open
Tracked by #5239 ...
OceanOak opened this issue Jan 24, 2025 · 0 comments
Open
Tracked by #5239 ...

Add wrapper functions for JSON Built-in functions in package space #5447

OceanOak opened this issue Jan 24, 2025 · 0 comments

Comments

@OceanOak
Copy link
Collaborator

We want to add Json package functions to wrap the existing built-in functions jsonSerialize and jsonParse

Example:

let serialize<'a> (a: 'a) : String =
  Builtin.jsonSerialize<'a> a

When executing the test Stdlib.Json.serialize<Int64> 0L = "0" we encounter the following error:

Unsupported type in JSON: 'a. Some types are not supported in Json serialization, and cannot be used as arguments to Builtin.jsonParse or Builtin.jsonSerialize

The built-in function is called with the generic type 'a instead of the actual type (e.g. Int64) that was passed in the package function.

Goal: ensure the actual type is properly passed to the built-in function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant