Cindiary/elm-not-empty/1.0.0

NOTE: the latest version is 1.2.0

Json.Encode.NotEmpty

Functions for encoding not empty collections into JSON values

list : (item -> Value) -> List item -> Value

Turn a NotEmpty.List into a JSON array.

array : (item -> Value) -> Array item -> Value

Turn a NotEmpty.Array into a JSON array.

set : (comparable -> Value) -> Set comparable -> Value

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

(comparable -> String)
-> (value -> Value)
-> Dict comparable value
-> Value

Turn a NotEmpty.Dict into a JSON object.