fix: compiling the json example

tested with ghc 7.4.1
Merge branch 'damiencourousse/json-example'
Fix first example in readme
Remove unneeded imports
Change Text to be a top level type
Merge branch 'fix/readme'