Rework the ParseJsonBuffer function to get one chunk at a time.