Change to use json rather than binary codecs