How to create JSON using Java

I have written a Java program that takes the Data from a file and constructs the JSON string using below Java program., recently I have been developing the Python Restful Wrapper Code for Big Data Model Scoring and Model Building, Here is the place where I need to pass the JSON  as an input to Python Model scoring Restful script, since I am in the development phase I don’t  have complete list of test Json to score the Model, hence I constructed the json by pulling the values from Database into an excel sheet and from excel sheet I read each line and constructed the JSON.

Input file with the values, I have saved it at this location : C:\\Users\\JavaChain\\Desktop\\Learning\\Parsing\\namesList.txt, from here I wrote Java Program to construct the Json by reading each line from the file and constructing the Key and value pairs of JSON document.

Below Input File need to be converted as JSON document:

Output:

Program on Eclipse:

jsonconstruct