An example of working with TCP and JSON in Haskell