;; JSON TAG SAMPLE CODE /* This example defines a Part for displaying ledger records. The JSONTag attribute is used to specify the tag name "DATA" under which the Part data will be exported in the JSON output. As a result, all records of the Part will appear inside the DATA tag during export. Syntax : [Part : ] Json Tag : */ [Collection : TSPL Ledger Collection] Type : Ledger Fetch : Name, Parent, OpeningBalance, ClosingBalance ;; Sample Code for using the JSON Tag attribute at Part definition. [#Menu: Gateway of Tally] Add : Item : Before : @@LocQuit : "Usage of JSON TAG" : Call : TSPL ExportLedgerReportAsJSon [Function: TSPL ExportLedgerReportAsJSon] 000: Set : SVExportFormat : $$SysName:JSON 010: Set : SVPrintFileName : ".\Export\LedgerReportJSON.json" 015: Export : TSPLLedgerRegister : Yes : Yes [Report: TSPLLedgerRegister] Title : "All Ledger" Form : TSPL Ledger Register Form Variable : SVFromDate, SVToDate [Form: TSPL Ledger Register Form] Part : TSPL Ledger Register Part Delete : XMLTag [Part: TSPL Ledger Register Part] Line : TSPL Ledger Register Line Repeat : TSPL Ledger Register Line : TSPL Ledger Collection Scroll : Vertical JSONTag : "DATA" [Line: TSPL Ledger Register Line] Fields : TSPLPartyName, TSPLParent, TSPLOpeningBalance,TSPLClosingBalance JSONTag : "Ledger_Details" [Field: TSPLPartyName] Use : Name Field Set As : $Name Full Width : Yes Style : Small Border : Thin Right JSONTag : "Name" [Field: TSPLParent] Use : Name Field Set As : $Parent Width : 20% Screen Style : Small Border : Thin Right JSONTag : "Parent" [Field: TSPLOpeningBalance] Use : Amount Field Set As : $OpeningBalance Width : 15% Screen Style : Small Border : Thin Right JSONTag : "OpeningBalance" [Field: TSPLClosingBalance] Use : Amount Field Set As : $ClosingBalance Width : 15% Screen Style : Small JSONTag : "ClosingBalance" ;;End of File.