michalmuskala / jason

A blazing fast JSON parser and generator in pure Elixir.
Other
1.6k stars 170 forks source link

Component available to support encoding of map from tuple list #100

Closed danj3 closed 4 years ago

danj3 commented 4 years ago

Hi, I've put together a component jason_tuple_list that allows a map to be constructed from a tuple list (more than a Keyword list since strings keys are necessary). I would publish it to hex but it depends on the unreleased master of jason.

The code is effectively trivial, but it formalizes an earlier issue and could be added as a dep and used.

For now, the following is required to make it a dep: { :jason_tuple_list, github: "danj3/jason_tuple_list" }

This will currently drag in the master version of Jason.

It's not a pretty scenario not being able to publish to hex since a lot of things depend on Jason and the necessary override.

michalmuskala commented 4 years ago

Yes, I intend to release the next version soon. Please give me couple days.

michalmuskala commented 4 years ago

I'm sorry it took quite a bit longer, but 1.2.0 with Jason.Encode.keyword/2 is published.