We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7346fb commit cdb1112Copy full SHA for cdb1112
src/Data/Codec/Argonaut/Record.purs
@@ -34,6 +34,16 @@ instance rowListCodecCons ∷
34
tail = rowListCodec (R.RLProxy ∷ R.RLProxy rs) ((unsafeCoerce ∷ Record ri → Record ri') codecs)
35
36
-- | Constructs a record codec from a record of codecs.
37
+-- |
38
+-- | ```purescript
39
+-- | type Person = { name ∷ String, age ∷ Int }
40
41
+-- | personCodec ∷ CA.JsonCodec Person
42
+-- | personCodec = CA.object "Person" (record { name: CA.string, age: CA.int })
43
44
+-- | decode personCodec "{ name: \"Carl\", age:\"25\" }" == Right { name: "Carl", age: 25 }
45
+-- | ```
46
+
47
record
48
∷ ∀ ri ro rl
49
. R.RowToList ri rl
0 commit comments