The Documentation for Aspose.Words for Cloud Templates 1.1 Features says that the API can consume data in JSON format, and instructs the user to look at the [executeTemplate (Controller Resource)] , but that thing is not a link, nor is it in the menu to the left. What documentation is the right one? The documentation for executeMailMerge (Controller Resource) doesn’t talk about JSON (except as a respones), neither does executeMailMerge vs executeTemplate.
As far as executeMailMerge resource is concerned, it does not support JSON in the request body. Our developers are working on this issue and it will be available very soon.
executeTemplate API does support JSON and you can use foreach structures, fields with a dot in the name like Address.City etc. and simple fields. In case of foreach, you will pass the JSON structures as a list. In case of a dot, you will pass a JSON structure and in case of simple field, you will pass simple value as you can see in the simple template JSON at http://www.aspose.com/docs/display/wordscloud/Execute+Mail+Merge+Template
In this example, Order is a foreach structure and passed as a list of orders. Address fields have dots in the field names and Address is passed as a JSON structure. Item is also a foreach structure and passed as a list of items. Remaining fields are simple fields and simple values are passed.
We will update your mentioned topics in a few hours for JSON related details and update you one done.
- Lays out in a positive fashion what is possible.
- E.g. rather than saying, “Mustache tags”, saying exactly, Aspose supports these 12 tags, and only these 12 tags, used in these circumstances.
- Or, rather than saying “JSON”, says exactly, you must submit a JSON structure to Aspose that:
- Is a dictionary (not a list), and
- has within it a single property that is a list of dictionaries,
- which has within it at least two properties.
- Or, lays out in a negative fashion what is possible, with reference to the standards.
- E.g. Aspose supports everything in Mustache tags, except for X, Y, and Z.
Thanks for the details. We will fix the issues reported in your threads on this topic and update the documentation accordingly.