convert the caption into an object with the required fields