Maintainer | Jiri Marsicek <jiri.marsicek@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Module provides flatten
which is used to flatten structure of Aeson
JSON Value
as much as possible.
Examples
Basic objects
{ "a": { "b": 1 } }
results in { "b": 1 }
{ "a": { "b": { "c": 1 } } }
results in { "c": 1 }
{ "a": [ { "b": { "c": 1 } }, { "b": { "c": 2 } } ] }
results in { "a": [ { "c": 1 }, { "c": 2 } ] }
Name conflicts result in data loss
{ "a": 1, "b": { "a": 2 } }
results in { "a": 1 }
- I don't know yet whether this is a feature or a bug :)