Added JSON en- and decoder.