<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json(self):
 """Return a list of records as a JSON string. Follows the BibJSON convention."""

        return json.dumps(OrderedDict([('metadata', self.metadata), ('records', self.records.values())]))