json representation of the metadata.

        :return: json representation of the metadata
        :rtype: str
351389
def json(self):
        
        json_dumps = json.dumps(
            self.dict,
            indent=2,
            sort_keys=True,
            separators=(',', ': '),
            cls=MetadataEncoder
        )
        if not json_dumps.endswith('\n'):
            json_dumps += '\n'
        return json_dumps
925080
def json_data(self):
        
        def stringify_keys(d):
            if not isinstance(d, dict):
                return d
            return dict((str(k), stringify_keys(v)) for k, v in d.items())
        data = self.make_data()
        json_data = json.dumps(stringify_keys(data))
        return json_data
18276
def tojson(self) -> str:
        
        return json.dumps({
            'event_id': str(self.id),
            'event_type': self.type,
            'schema_name': self.schema_name,
            'table_name': self.table_name,
            'row_id': self.row_id
        })
1161246
def dict(self):
        
        metadata = {}
        properties = {}
        for name, prop in list(self.properties.items()):
            properties[name] = prop.dict
        metadata['properties'] = properties
        return metadata
1018713
def to_dict(self):
        
        data = {
            'name': self.name,
            'video_id': self.video_id,
            'time': self.time,
            'forceStop': self.force_stop,
            'type': self.type,
            'metadata': self.metadata}
        for key in data.keys():
            if data[key] == None:
                data.pop(key)
        return data
917244
def to_json(self):
        
        return {
            'userId': self.user_id,
            'username': self.username,
            'roles': self.roles,
            'authSystem': self.auth_system
        }
1255194
def to_dict(self):
        
        result = {}
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            key = name.replace("_", "-")
            attr = getattr(self, name)
            result[key] = attr.to_dict() if hasattr(attr, "to_dict") else attr

        return result
436996
def json(self):
        
        return {
            "model_type": self.model_type,
            "formula": self.formula,
            "status": self.status,
            "model_params": self.model_params,
            "r_squared_adj": _noneify(self.r_squared_adj),
            "warnings": [w.json() for w in self.warnings],
        }
131941
def json(self):
        """"""
        return json.dumps(OrderedDict([('metadata', self.metadata), ('records', self.records.values())]))
818592
def json_description(shape, **metadata):
    
    metadata.update(shape=shape)
    return json.dumps(metadata)
1220027
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'value') and self.value is not None:
            _dict['value'] = self.value
        if hasattr(self, 'metadata') and self.metadata is not None:
            _dict['metadata'] = self.metadata
        if hasattr(self, 'value_type') and self.value_type is not None:
            _dict['type'] = self.value_type
        if hasattr(self, 'synonyms') and self.synonyms is not None:
            _dict['synonyms'] = self.synonyms
        if hasattr(self, 'patterns') and self.patterns is not None:
            _dict['patterns'] = self.patterns
        if hasattr(self, 'created') and self.created is not None:
            _dict['created'] = datetime_to_string(self.created)
        if hasattr(self, 'updated') and self.updated is not None:
            _dict['updated'] = datetime_to_string(self.updated)
        return _dict
1003085
def serialize(self) -> dict:
        
        data = {**self}
        if "attachments" in self:
            data["attachments"] = json.dumps(self["attachments"])
        return data
7831
def to_json(self):
        
        self.logger.debug("Returning json info")
        individual_info = {
            'family_id': self.family,
            'id':self.individual_id, 
            'sex':str(self.sex), 
            'phenotype': str(self.phenotype), 
            'mother': self.mother, 
            'father': self.father,
            'extra_info': self.extra_info
        }
        return individual_info
317654
def to_dict(self):
        
        return dict((parameter.name, parameter.value) for parameter in self.values())
656464
def to_dict(self) -> dict:
        ''''''

        return {
            "version": self.version,
            "description": self.description,
            "count_mode": self.count_mode,
            "start_block": self.start_block,
            "end_block": self.end_block,
            "choices": self.choices,
            "vote_metainfo": self.vote_metainfo
        }
907912
def to_json(self):
        
        data = dict()

        for key, value in self.__dict__.items():
            if value:
                if hasattr(value, 'to_dict'):
                    data[key] = value.to_dict()
                elif isinstance(value, datetime):
                    data[key] = value.strftime('%Y-%m-%d %H:%M:%S')
                else:
                    data[key] = value

        return json.dumps(data)
781380
def to_json(self):
        
        return {
            'resourceType': self.resource.resource_type_id,
            'resourceId': self.id,
            'accountId': self.resource.account_id,
            'account': self.account,
            'location': self.resource.location,
            'properties': {to_camelcase(prop.name): prop.value for prop in self.resource.properties},
            'tags': [{'key': t.key, 'value': t.value} for t in self.resource.tags]
        }