How To Create Our Picshare Photo Decoder — Tentamen Software Testing Blog

TL;DR

In the previous post, we learned how to safely decode JSON from a String with elm-JSON-decode-pipeline package. Today we apply this knowledge to create our Picshare Photo Decoder. This post is part of the functional language series, and it is based on a remarkable book, Programming Elm Build Safe and Maintainable Front-End Applications by Jeremy Fairbank.

Photo Decoder

Follow instructions in comments in the following gist:

1st to 6th comments is straightforward; you learned what they do in the previous blog post. We are expanding that knowledge to create our Photo Decoder for Photo Elm type.

Now we can use it in the REPL session from the screenshot above.

Originally published at https://blog.tentamen.eu on December 5, 2020.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store