Updated json generation plus 'root node' to 'is root node'