poison icon indicating copy to clipboard operation
poison copied to clipboard

Improved hex docs

Open orestis opened this issue 8 years ago • 3 comments

The current hex docs are quite bare: Only a minimum API reference, empty modules (Poison.Encoder, Poison.Pretty) and no examples of what options can be passed to encode etc.

It would be nice to expose the current README in the hex docs, to start with. Thanks!

orestis avatar Jan 17 '17 10:01 orestis

I'm willing to submit a PR for this. Currently I'm looking for a way to pretty encode a value using Poison.encode/2 and the docs

def encode(value, options \\ [])                  

Encode a value to JSON.

┃ iex> Poison.encode([1, 2, 3])
┃ {:ok, "[1,2,3]"}

One shouldn't have to have to look at the code to figure out the available options.

zorbash avatar Feb 21 '17 10:02 zorbash

I'm also willing to take the time to write some doc blocks. For such a popular module it has uncharacteristically sparse docs. It's a significant barrier to entry.

cthree avatar Feb 27 '17 17:02 cthree

I'm also willing to help improving the docs. I see that there's already a related PR open https://github.com/devinus/poison/pull/123

scmx avatar Nov 13 '17 23:11 scmx