• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
      • HTML in CSPro
      • Localhost URL
      • External Libraries
      • JSON Primer
      • HTML Dialog Boxes
      • JavaScript Interface (deprecated)
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

JSON Primer

JSON, an acronym for JavaScript Object Notation, is a format for representing objects in text format using property/value pairs. The format is widely used by web-based applications, and details about the JSON format can be readily found online. A general overview and an example will demonstrate basic features:
  • Objects are surrounded by curly brackets { }.
  • Property names appear in "quoted strings".
  • Subsequent property/value pairs are separated by a comma.
  • Numeric values can be specified directly.
  • String values are specified using a properly constructed string with certain characters escaped. The encode function can create such strings by using the JsonString option.
  • Arrays are surrounded by square brackets [ ].
JSON Example
{
 
"csproVersion": 8.0,
 
"csproUsersForumUrl": "https://www.csprousers.org/forum",
 
"applicationTypes": [
   
"Data Entry",
   
"Batch Edit",
   
"Tabulation"
  ]
}
JSON in CSPro
JSON is used throughout CSPro in a variety of ways, including:
  • Many CSPro specification files are saved in JSON format.
  • The JSON data source reads and writes cases in JSON.
  • CSPro logic objects can be expressed as JSON or modified using JSON.
  • Listing files can be written to JSON format.
  • Frequency files can be written to JSON format.
  • Action Invoker actions can be specified in JSON.