### 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
seen.add(key)
                acr = AnsibleCollectionRef.try_parse_fqcr(key, self._dirname)
                if not acr:
                    raise KeyError('invalid plugin name: {0}'.format(key))
                ts = _get_collection_metadata(acr.collection)
                
                routing_entry = ts.get('plugin_routing', {}).get(self._dirname, {}).get(leaf_key, {})
                deprecation_entry = routing_entry.get('deprecation')
                if deprecation_entry:
                    warning_text = deprecation_entry.get('warning_text')
                    removal_date = deprecation_entry.get('removal_date')
                    removal_version = deprecation_entry.get('removal_version')
                    if not warning_text:
                        warning_text = '{0} "{1}" is deprecated'.format(self._dirname, key)
                    display.deprecated(warning_text, version=removal_version, date=removal_date, collection_name=acr.collection)
                tombstone_entry = routing_entry.get('tombstone')
                if tombstone_entry:
                    warning_text = tombstone_entry.get('warning_text')
                    removal_date = tombstone_entry.get('removal_date')
                    removal_version = tombstone_entry.get('removal_version')
                    if not warning_text:
                        warning_text = '{0} "{1}" has been removed'.format(self._dirname, key)
                    exc_msg = display.get_deprecation_message(warning_text, version=removal_version, date=removal_date,
                                                              collection_name=acr.collection, removed=True)
                    raise AnsiblePluginRemovedError(exc_msg)
                redirect = routing_entry.get('redirect', None)
                if redirect:
                    next_key, leaf_key = get_fqcr_and_name(redirect, collection=acr.collection)
                    display.vvv('redirecting (type: {0}) {1}.{2} to {3}'.format(self._dirname, acr.collection, acr.resource, next_key))
                    key = next_key