Java code to parse the text data and convert to a JSON for use with MongoDB