### Summary

While templating a JSON file where the JSON was created as part of a template (without using `to_json`) and where a macro was used to template some repeated parts, we found out that the generated JSON file was invalid JSON after switching from ansible-core 2.12 to ansible-core 2.13.

The problem seems to be that if the output of a macro looks like something that could be a Pyhon `repr()` result, it is converted back to Python datastructures.

### Issue Type

Bug Report

### Component Name

templar

### Ansible Version

```console
2.13.0
devel branch
```


### Configuration

```console
default
```


### OS / Environment

Linux

### Steps to Reproduce

```.bash
ansible localhost -m debug -a "msg='{% macro foo() %}{ "'"'"foo"'"'": "'"'"bar"'"'" }{% endmacro %}Test: {{ foo() }}'"
```
Or as a task:
```.yaml
- hosts: localhost
  tasks:
  - debug:
      msg: >-
        {% macro foo() %}{ "foo": "bar" }{% endmacro %}Test: {{ foo() }}
```


### Expected Results

```
"Test: {\"foo\": \"bar\"}"
```

### Actual Results

```console
"Test: {'foo': 'bar'}"
```
(This has `'` instead of `"`, so this isn't valid JSON.)
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
newsearchpath = []
                    for p in searchpath:
                        newsearchpath.append(os.path.join(p, 'templates'))
                        newsearchpath.append(p)
                    searchpath = newsearchpath
                searchpath.insert(0, os.path.dirname(lookupfile))
                
                
                
                
                vars = deepcopy(variables)
                vars.update(generate_ansible_template_vars(term, lookupfile))
                vars.update(lookup_template_vars)
                with templar.set_temporary_context(variable_start_string=variable_start_string,
                                                   variable_end_string=variable_end_string,
                                                   comment_start_string=comment_start_string,
                                                   comment_end_string=comment_end_string,
                                                   available_variables=vars, searchpath=searchpath):
                    res = templar.template(template_data, preserve_trailing_newlines=True,
                                           convert_data=convert_data_p, escape_backslashes=False)
                if C.DEFAULT_JINJA2_NATIVE and not jinja2_native:
                    
                    
                    res = NativeJinjaText(res)
                ret.append(res)
            else:
                raise AnsibleError("the template file %s could not be found for the lookup" % term)
        return ret