a simple parser, encoder and decoder for URIs