private void writeTask ( Task task ) throws IOException { writeFields ( null , task , TaskField . values ( ) ) ; for ( Task child : task . getChildTasks ( ) ) { writeTask ( child ) ; } }
This method is called recursively to write a task and its child tasks to the JSON file .