### 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
except TemplateSyntaxError:
        return False
    return False
def _count_newlines_from_end(in_str):
    '''
    Counts the number of newlines at the end of a string. This is used during
    the jinja2 templating to ensure the count matches the input, since some newlines
    may be thrown away during the templating.
    '''
    try:
        i = len(in_str)
        j = i - 1
        while in_str[j] == '\n':
            j -= 1
        return i - 1 - j
    except IndexError:
        
        return i
def recursive_check_defined(item):
    from jinja2.runtime import Undefined
    if isinstance(item, MutableMapping):
        for key in item:
            recursive_check_defined(item[key])
    elif isinstance(item, list):
        for i in item:
            recursive_check_defined(i)
    else:
        if isinstance(item, Undefined):
            raise AnsibleFilterError("{0} is undefined".format(item))
def _is_rolled(value):