| Copyright | (c) Anton Gushcha 2016 |
|---|---|
| License | MIT |
| Maintainer | ncrashed@gmail.com |
| Stability | experimental |
| Portability | Portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Aeson.Unit
Description
Common problem in REST interfaces when you need to return nothing as result, usage of `()` will produce `[]` JSON. That causes problems in some JSON parsers in other languages.
So, Unit serialises into empty JSON object:
>>>encode Unit"{}"