Product:
Product Version:
Please give a brief summary of your issue:
Error found when pulling a number from json in the template
Please describe your issue and provide steps to reproduce it:
Json being used
{
“root”: {
“legal_heading”: {
“publisher”: “ABC”,
“content”: “End-User Agreement”
},
“legal_clauses”: [{
“legal_clause”: “Sed ut unde omnis iste natus error sit volup tatem…”
},
{
“legal_clause”: “Lorem ipsum dolor sit amet, consec tetuer adipi s…”
},
{
“legal_clause”: “pretium quis, sem. Nulla conse quat massa quis eni…”
},
{
“legal_clause”: “idunt. Cras dapibus. Vivamus elem entum semper nis…”
}
],
“version”: 1
}
}
And in the template
{{root.legal_heading.content}} [version: {{root.version}}]
{{loop root.legal_clauses}}
{{legal_clause}}
{{endloop}}
com.pdftron.common.PDFNetException: Exception:
Message: Template error: Text replacement value must be a string in the input JSON. Tag: ‘root.version’.
Conditional expression: val.is_string() || val.is_undefined()
Version : 9.4.2-a2633dd18a
Platform : Windows
Architecture : AMD64
Filename : SimpleTemplateNode.cpp
Function : trn::Layout::SimpleTemplateNode::ProcessText
Linenumber : 205
at com.pdftron.pdf.TemplateDocument.FillTemplateJson(Native Method)
at com.pdftron.pdf.TemplateDocument.fillTemplateJson(TemplateDocument.java:70)
Please provide a link to a minimal sample where the issue is reproducible: