nrinaudo / kantan.codecs

Generic encoders / decoders for the various kantan libraries.

Website GitHub

kantan.codecs

Build Status codecov Latest version Join the chat at https://gitter.im/nrinaudo/kantan.codecs

Overview and warning

Existing and planned kantan libraries are heavily encoding and decoding oriented - their main purpose is to turn raw data and decode it into useful types, or vice-versa. kantan.xpath, for instance, is all about turning the results of XPath expressions into types that can be more easily manipulated than strings or nodes.

Since all these libraries share the same underlying purpose, it's only natural they should also share a lot of data structures, or at least shapes of data structures. Both kantan.csv and kantan.xpath, for example, define a DecodeResult type which is essentially the same.

kantan.codecs tries to unify these types and provide generic laws and tests for them, which both reduces code duplication and provides a common vocabulary for all kantan libraries.

It really isn't meant to be used directly and is more of a support library for more directly useful ones.