Convert tree data structure from Database into JSON in Java
<p>We have a database that has the child_id, parent_id and the other details for each row of a tree in the database. I am looking for a best method to read the data from the database recursively and create the JSON not knowing how deep the child items run under each root node. Also is there something that helps create the JSON without having to write the syntax of JSON manually in the program? Thanks in advance for any pointers.</p>
