safe-json
safe-json copied to clipboard
Documentation tweaks
The test functions like migrateRoundTripProp
don't need a second type application.
Adjust examples, but note that adding the second type gives guarantee it's migrating from the right type.
Also:
-
"Containers"
in the comment of theSafeJSON [a]
instance shouldn't be a link. -
'Version'\'s
should probably be'Version''s
? -
setVersion'
doesn't link the quoted words in it's example (remove quotes?)
Also:
* `"Containers"` in the comment of the `SafeJSON [a]` instance shouldn't be a link. * `'Version'\'s` should probably be `'Version''s`? * `setVersion'` doesn't link the quoted words in it's example (remove quotes?)
These have been addressed in #26
In the README
λ> Just vals = parseMaybe safeFromJSON/parseJSON incomingJSON :: Maybe [Value]
This part makes no sense: in the example, incomingJSON
is already [Value]
, so why are we parsing it to a [Value]
again... AND then not double fmap
-ing!
Just remove this line.
incomingJSON
is already[Value]
No, no it's not. It's Value
, that's why it's being parsed to "just force the array" to then setVersion
on the individual Value
s, which then get encoded correctly.
The test functions like
migrateRoundTripProp
don't need a second type application. Adjust examples, but note that adding the second type gives guarantee it's migrating from the right type.
This is the only thing in this issue that is still a "to do", but I want to test this out before removing it in the comments.