-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Concept: JSON Decoders #538
Comments
@ceddlyburge related to our discussion on #621, I went through the exercises that we don't have implemented yet ( Basically no other is meant to practice JSON, so we would have to stretch some scopes. I found two that may be interesting: If we are OK with very simple decoding, maybe we could use Best for last: What do you think? |
I think the api concept is still good, its just that it is complicated, and the instructions are not as clear as they might be (especially for Elm I think). Maybe we could jump on a call sometime and discuss how to make it clear what the student is supposed to do? |
Oh I still intend to keep |
Hmmm, none of those look that good. Maybe we could create a new exercise. Json encoding / decoding is something that people do find confusing when starting Elm, so it is a good idea. Maybe encoding a request to the github api (which is well known), and decoding a response? |
Creating a proper new practice exercise is way more work than I'm willing to do! |
Good idea to work on a concrete real-life thing. We'd have to rebuild the JS |
Design
Goal
The Goal is to learn to use the
Json.Decode
andJson.Encode
modules.Learning objectives
Students should be able to
Value
(Json.Encode.object
,list
and other primitives)encode
)bool
,int
,string
...)list
,dict
,nullable
)field
,at
)maybe
,oneOf
)map
,andThen
,succeed
)decodeString
)Out of scope
array
,set
)array
,keyValuePairs
,oneOrMore
,index
,null
,value
)Error
andfail
lazy
, a quick mention is fine)Concepts
The concept this exercise unlocks is:
json
Prerequisites
Analyzer
TBD depending on the exercise
Comments
rest-api
first to have one practice exerciseThe text was updated successfully, but these errors were encountered: