File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Data.Codec [ ![ Build Status] ( https://travis-ci.org/chpatrick/codec.svg )] ( https://travis-ci.org/chpatrick/codec )
22
3+ [ Online documentation] ( http://chpatrick.github.io/codec/ )
4+
35Tired of writing complementary ` parseJSON ` /` toJSON ` , ` peek ` /` poke ` or Binary ` get ` /` put ` functions?
46
57` codec ` provides easy bidirectional serialization of plain Haskell records in any Applicative context.
@@ -12,11 +14,11 @@ JSON!
1214
1315 userCodec :: JSONCodec User
1416 userCodec = obj "user object" $
15- User
16- $>> f_username >-< "user"
17- >>> f_userEmail >-< "email"
18- >>> f_userLanguages >-< "languages"
19- >>> f_userReferrer >-< opt "referrer"
17+ User
18+ $>> f_username >-< "user"
19+ >>> f_userEmail >-< "email"
20+ >>> f_userLanguages >-< "languages"
21+ >>> f_userReferrer >-< opt "referrer"
2022
2123 instance FromJSON User where
2224 parseJSON = parseVal userCodec
You can’t perform that action at this time.
0 commit comments