I use line numbers in the original text document to always reliably retrieve all content for the final JSON output. Here is my high level diagram: