Improvements to JSON partsing