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

Json.Json! #31

Open
pravdomil opened this issue Jul 25, 2021 · 1 comment
Open

Json.Json! #31

pravdomil opened this issue Jul 25, 2021 · 1 comment

Comments

@pravdomil
Copy link

pravdomil commented Jul 25, 2021

Similar to Bytes.Bytes and Bytes.Encode, Bytes.Decode.

I would be nice to have Json.Json type and remove Encode.Value and Decode.Value.

I was confused what is difference between Encode.Value and Decode.Value.
And then I check the source code and realize that it is alias.

I would say that having Json.Json type will make very clear - it is a JSON!

What do you think?

@lue-bird
Copy link

lue-bird commented May 9, 2022

As it's not guaranteed to carry a value in valid JSON format – It's a js value – I'd be in favor of calling it Json.JsMagicValue or something in that direction;
hinting that it's compiler magic which isn't caseable and can cause elm to fail on == (#29 #30 related)
and which can include functions, proxies, getters, bigInts, anything.

and.. which can be abused to break elm's promises

(sorry for snitching)

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

2 participants