How to best support merge tags/tokens in a JSON Formatter / Viewer control

I am looking for a way to support merge tags/tokens inside JSON that will either pass validation and retain the primitive data types or ideally it would work with our the popular standard JSON formatter control for validation.

However I realise there will need to be a custom approach here as our merge tags utilize the same structure characters as JSON.

enter image description here

In the above example, we need to map this key to a merge tag/token that contains a number. However the JSON does not validate because the merge tag/token’s name itself is a string.

Any suggestions are welcomed. Looking for a creative approach that will be user friendly and easy to understand what is going on with the JSON. Also open to using other controls.

Background: The frontend is React.js with a ASP.Net backend. The purpose of this part of the BPM/IPaaS application is to configure a payload to be sent to an API based on data in the system. It must be flexible enough to generate objects, arrays, and other keys based on mapped data points while allowing us to replace merge tags/tokens.

Thanks in advance.