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

Note (in docu) that Json.Decode.succeed may fail? #613

Closed
jvoigtlaender opened this Issue May 19, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@jvoigtlaender
Contributor

jvoigtlaender commented May 19, 2016

The current documentation says (http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Json-Decode#succeed):

A decoder that always succeeds.

But actually, this should be preconditioned on the input being valid JSON. Already something simple as an empty string as input can make the decoder fail. That's non-obvious and has led to confusion, see here and here (and also in the more distant past).

Maybe warn about this in some way in the documentation, since the current wording "always succeeds" does raise wrong expectations?

@jvoigtlaender jvoigtlaender changed the title from Note that Json.Decode.succeed may fail to Note (in docu) that Json.Decode.succeed may fail? Aug 21, 2016

@jvoigtlaender jvoigtlaender added the docs label Aug 30, 2016

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Oct 12, 2016

Contributor

Is addressed in the new documentation.

Contributor

jvoigtlaender commented Oct 12, 2016

Is addressed in the new documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment