Tutorial by Topics: decode

Json.Decode exposes two functions to decode a payload, first one is decodeValue which tries to decode a Json.Encode.Value, the second one is decodeString which tries to decode a JSON string. Both function take 2 parameters, a decoder and a Json.Encode.Value or Json string.
The regular expression used in the Decode URL examples was taken from RFC 2396, Appendix B: Parsing a URI Reference with a Regular Expression; for posterity, here's a quote: The following line is the regular expression for breaking-down a URI reference into its components. ^(([^:/?#]+):)?(//(...
How to use Json.Decode to create custom decoders, for example decoding into union types and user defined data types

Page 1 of 1