Update json encoding and decoding to use ujson.