def json(self):
if self.meta_type == '<STR_LIT:list>':<EOL><INDENT>ret = []<EOL>for dat in self._list:<EOL><INDENT>if not isinstance(dat, composite):<EOL><INDENT>ret.append(dat)<EOL><DEDENT>else:<EOL><INDENT>ret.append(dat.json())<EOL><DEDENT><DEDENT>return ret<EOL><DEDENT>elif self.meta_type == '<STR_LIT>':<EOL><INDENT>ret = {}<EOL>for key in self._dict:<EOL><INDENT>if not isinstance(self._dict[key], composite):<EOL><INDENT>ret[key] = self._dict[key]<EOL><DEDENT>else:<EOL><INDENT>ret[key] = self._dict[key].json()<EOL><DEDENT><DEDENT>return ret<EOL><DEDENT>
Return JSON representation of object.