hi friends please tell me how to create these type in JSON with Servlet.
in my database table i have one table with two columns name and value with some data. so, i want to create that databse data into one json file using servlet. the JSON file data will be like below things. please tell me how to create these json file using servlet
i tried these code. here data is comming from database, so next i want to create these data into json format. can you tell me anyone
If you read through the responses you have been getting you will find advice to put the data into a POJO and then read a tutorial for a JSON API (you get to choose one) which will show you how to create the JSON (typically in a one line statement).