Performance improvement for json conversion.