https://github.com/martinkavik/ord_map_encoder_poison
OrdMap encoder for Poison
https://github.com/martinkavik/ord_map_encoder_poison
elixir encoder json map ordered package poison
Last synced: 12 months ago
JSON representation
OrdMap encoder for Poison
- Host: GitHub
- URL: https://github.com/martinkavik/ord_map_encoder_poison
- Owner: MartinKavik
- License: mit
- Created: 2017-11-14T16:31:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T20:56:57.000Z (over 8 years ago)
- Last Synced: 2024-10-05T16:39:18.329Z (over 1 year ago)
- Topics: elixir, encoder, json, map, ordered, package, poison
- Language: Elixir
- Homepage: https://hexdocs.pm/ord_map_encoder_poison
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [OrdMap](https://github.com/MartinKavik/ord_map) encoder for [Poison](https://github.com/devinus/poison)
[](https://hex.pm/packages/ord_map_encoder_poison)
## Usage
```elixir
o(%{"foo" => o(%{"bar" => "baz"})})
|> Poison.Encoder.encode(pretty: true)
|> IO.iodata_to_binary()
|> assert("""
{
"foo": {
"bar": "baz"
}
}\
""")
```
## Installation
First, add encoder to your mix.exs dependencies:
```elixir
def deps do
[
{:ord_map_encoder_poison, "~> 0.1.0"}
]
end
```
Then, update your dependencies:
```sh-session
$ mix deps.get
```
## License
OrdMapEncoderPoison is released under MIT (see [`LICENSE`](LICENSE)).