json encoder and decoder not yet tested with match