Cindiary / elm-not-empty / Json.Encode.NotEmpty

Functions for encoding not empty collections into JSON values

list : (item -> Json.Encode.Value) -> NotEmpty.List item -> Json.Encode.Value

Turn a NotEmpty.List into a JSON array.

array : (item -> Json.Encode.Value) -> NotEmpty.Array item -> Json.Encode.Value

Turn a NotEmpty.Array into a JSON array.

set : (comparable -> Json.Encode.Value) -> NotEmpty.Set comparable -> Json.Encode.Value

Turn a NotEmpty.Set.Set into a JSON array.

dict : (comparable -> String) -> (value -> Json.Encode.Value) -> NotEmpty.Dict comparable value -> Json.Encode.Value

Turn a NotEmpty.Dict into a JSON object.

string : NotEmpty.String -> Json.Encode.Value

Turn a NotEmpty.String into a JSON array.