We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Value of JSON field is incorrectly outputted as Date instead of text

I have a DOCX file with the following template <<[heading]>>. My data source is a JSON like follows:
{
“heading”: “100.2.1”
}

When generating a DOCX from this template and data the output is something like
Fri Jan 31 20:00:00 AST 100

I was expecting the literal value 100.2.1 to be printed instead.
How can I achieve this?

@evargaslexipol

What is the API version that you are using? Could you please share the sample application along-with source and data source files?

I’m attaching a ZIP file with the template file, the json data file and a test program that uses them to generate a report.
test.zip (961 Bytes)

I’m using this version

com.groupdocs:groupdocs-assembly:22.2

I was able to get the desired output by setting the date-time parsers to an empty list.

JsonDataLoadOptions options = new JsonDataLoadOptions();
options.setExactDateTimeParseFormats(Collections.emptyList());
JsonDataSource jsonDataSource = new JsonDataSource(dataPath.toString(), options);

@evargaslexipol

Glad to know that the issue is resolved.