def json(self):
data = {}<EOL>for item in self._data:<EOL><INDENT>if isinstance(self._data[item], filetree):<EOL><INDENT>data[item] = self._data[item].json()<EOL><DEDENT>else:<EOL><INDENT>data[item] = self._data[item]<EOL><DEDENT><DEDENT>return data<EOL>
Return JSON representation of object.