Conversion to use reference JSON library.