JSON Data Files
(As of 3.2.001.01 experimental limited support of JSON input data was introduced.)
(As of 3.2.001.09 support was extended and improved.)
You should understand that Merge was designed to consume XML data and there is no one-to-one conversion between XML and JSON but we do our best to make it as close as possible so Merge may consume JSON as well. There may be tricky scenarios and you may have to adjust or restructure your JSON in some cases.
A typical JSON data file looks like this:
{ "Document": [ { "ChargeTo": { "Name": "TONY BLUE", "Addr1": "1/44 GREEN ST", "Addr2": "YELLOWTOWN 3135" }, "Header": { "Invoice": "10026645", "Date": "19MAR2010", "SalesPerson": "3", "AccountNum": "001327" }, "DetailLines": [ { "LineItem": { "ItemCode": "F/GW712", "Desc": "EXCELLENCE 7.5KG WASHER", "Qty": "1", "Price": "1089.00", "Discount": "NETT", "TAX": "108.91 **" } }, { "LineItem": { "ItemCode": "F/ED56", "Desc": "4.5KG S/S DRYER", "Qty": "1", "Price": "618.00", "Discount": "NETT", "TAX": "61.24 **" } }, { "LineItem": { "ItemCode": "E/DS1100", "Desc": "TURBO HEAD", "Qty": "1", "Price": "53.90", "Discount": "NETT", "TAX": "0.00 **" } } ], "Totals": { "TotalPrice": "$1760.90", "TotalTAX": "$174.50" } }, { "a" : "second set of data" } ] }
Note, you may examine the format of JSON input data via opening sample or your form in Design, navigating menu Tools > PDF Preview > Auto Generate Test Data > Save JSON Data and checking the resulting JSON file.
Also, if you have JSON data file and are not sure how it is going to be matched with your form you may open Design, at the bottom-left, find "Data Explorer" pane, and using the context menu, "Open data file" on it examine what the resulting data structure will look like.
See Also