Add tests for json decoder.