Some improvements in json serdes.