CHAPTER 10

image

Building and Parsing Text

The previous chapter has opened the door to side effects and in particular to saving data from your Haskell application on disk or sending it through the network. However, the only true serialization mechanism that was introduced was the binary one, through the binary package.

In many cases a textual representation of data is preferable to a binary one. Even though usually it’s much larger, data encoded in text is more readable for a human consumer, making your programs much easier to inspect and debug. Furthermore, many interchange formats such as XML or JSON encode the data in text, adding to the plain information ...

Get Beginning Haskell: A Project-Based Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.