gdritter repos ndbl / ac075d1
Updated README to reflect API changes Getty Ritter 10 years ago
1 changed file(s) with 4 addition(s) and 8 deletion(s). Collapse all Expand all
168168 Haskell API
169169 -----------
170170
171 Three sets of `encode`/`decode` pairs are provided. One produces a sequential
172 list of multimap (as implemented by the `multimap` package); one produces
173 a sequential list of lists of pairs; and one
174 flattens the list of lists into just a list, for simple situations in which
175 grouping is irrelevant to the configuration. Each function pair guarantees
176 that `fromJust . decode . encode == id`, although be aware that
177 `encode . fromJust . decode /= id`, as multiple valid NDBL
178 documents may correspond to a single NDBL representation.
171 At present, the Haskell API exposes an `encode`/`decode` pair which
172 (respectively) produce and consume lists of lists of key-value pairs.
173 Future work involves typeclasses to make consuming and producing datatypes
174 which correspond to NDBL documents easier.