Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upJson.Decode.list is not consistent #889
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Aug 1, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Aug 1, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
evancz
added
the
no sscce
label
Aug 1, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 1, 2017
Member
Edit your post to have an http://sscce.org/. Get rid of the dependency on that JSON helper package. Just use the core Json.Decode functions. This helps minimize the issue and ensure that it really is a core thing.
|
Edit your post to have an http://sscce.org/. Get rid of the dependency on that JSON helper package. Just use the core |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 1, 2017
Member
Actually, just make a new issue with the SSCCE. I think that'll work better.
|
Actually, just make a new issue with the SSCCE. I think that'll work better. |
ghivert commentedAug 1, 2017
Hi!
Encountered a bug today with decoders. Here's the case:
Used with a list like this:
[ {"id":3,"user_id":1,"cloudinary_id":"xxxxxx"}, {"id":2,"user_id":1,"cloudinary_id":"yyyyyy"}, {"id":1,"user_id":1,"cloudinary_id":"zzzzzz"} ]On Chrome Mac, I got:
But on Chrome Windows, I got:
I just got the correct behavior by adding a
Json.Decode.map (List.sortBy .id)afterdecodeUserPhotos. I think the output list should be consistent, whatever browser you're using.I imagine it is browser specific?