[FreeMarker Error] Failed to "?eval" string

Background

When I use the FreeMarker to generate text files, occurs an error: Failed to “?eval” string.

<#assign dataFromConfigJson = columnMapping.formComponentDataFromConfig?eval>

Error Info

FreeMarker template error:
Failed to "?eval" string with this error:

---begin-message---
Syntax error in ?eval-ed string in line 1, column 175:
Encountered "}", but was expecting one of:
<STRING_LITERAL>
<RAW_STRING>
"false"
"true"
<INTEGER>
<DECIMAL>
"."
".."
<DOT_DOT_LESS>
"..*"
"?"
"??"
"+"
"-"
"!"
","
"["
"]"
"("
"{"
<ID>
<TERMINATING_EXCLAM>
"+"
"-"
---end-message---

The failing expression:
==> columnMapping.formComponentDataFromConfig?eval [in template "templates/demo\\html\\test.ftl" at line 208, column 41]

----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign dataFromConfigJson = columnMa... [in template "templates/demo\\html\\test.ftl" in macro "generateFormItems" at line 208, column 11]
- Reached through: @generateFormItems type="search" [in template "templates/demo\\html\\test.ftl" at line 582, column 7]
----

Solutions

Corrects the JSON string of the field of data that passed to the FreeMarker Template object.

Reasons

The JSON string is invalid.