def METHOD_NAME(self, parser, one=False):
    """Convert the record according to the given parser.
    Example of (simple) parser:
        parser = [
            'name',
            'number',
            'create_date',
            ('partner_id', ['id', 'display_name', 'ref'])
            ('shipping_id', callable)
            ('delivery_id', "record_method")
            ('line_id', ['id', ('product_id', ['name']), 'price_unit'])
        ]
    In order to be consistent with the Odoo API the jsonify method always
    returns a list of objects even if there is only one element in input.
    You can change this behavior by passing `one=True` to get only one element.
    By default the key into the JSON is the name of the field extracted
    from the model. If you need to specify an alternate name to use as
    key, you can define your mapping as follow into the parser definition:
    parser = [
         'field_name:json_key'
    ]
    """
    if one:
        self.ensure_one()
    if isinstance(parser, list):
        parser = convert_simple_to_full_parser(parser)
    resolver = parser.get("resolver")
    results = [{} for record in self]
    parsers = {False: parser["fields"]} if "fields" in parser else parser["langs"]
    for lang in parsers:
        translate = lang or parser.get("language_agnostic")
        records = self.with_context(lang=lang) if translate else self
        for record, json in zip(records, results):
            self._jsonify_record(parsers[lang], record, json)
    if resolver:
        results = resolver.resolve(results, self)
    return results[0] if one else results