Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P parabix-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cameron
  • parabix-devel
  • Wiki
  • csv2json

csv2json · Changes

Page history
Update csv2json authored Nov 09, 2021 by cameron's avatar cameron
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 3 deletions
+6 -3
  • csv2json.md csv2json.md +6 -3
  • No files found.
csv2json.md
View page @ 0e149e88
...@@ -18,11 +18,14 @@ applicable to produce a correct JSON format. ...@@ -18,11 +18,14 @@ applicable to produce a correct JSON format.
1. Every CSV data record is translated into a JSON object with key-value pairs enclosed in "`{}`". 1. Every CSV data record is translated into a JSON object with key-value pairs enclosed in "`{}`".
2. CSV headers become the keys for each key-value pair. 2. CSV headers become the keys for each key-value pair.
3. The data values in each column of each CSV record are translated into JSON strings enclosed in double quotes (`"`). 3. The data values in each column of each CSV record are translated into JSON strings enclosed in double quotes (`"`).
4. The generated JSON objects are stored in one large JSON array.
5. The JSON objects are displayed one per line, with no other whitespace added to the representation.
Although this scheme is universal, it could be preferable to translate some data values Although this scheme is universal, it could be preferable to translate some data values
into JSON numbers, booleans or the `null` value instead. However, we first consider into JSON numbers, booleans (`true` and `false`) or the `null` value instead.
the universal scheme in order to illustrate the simplest application of Parabix methods Other options involve different whitespace conventions for the JSON output and/or possibly
to this problem. translating some CSV values into structured JSON objects.
However, we first consider the universal scheme in order to illustrate the simplest application of Parabix methods to this problem.
## Example ## Example
As a simple running example, we use the following CSV input file. As a simple running example, we use the following CSV input file.
......
Clone repository
  • Bracket Matching
  • CSV Validation
  • CSVediting
  • CSVparsing
  • Character Code Compilers
  • KernelLibrary
  • Pablo
  • ParabixTransform
  • Parallel Deletion
  • Parallel Hashing
  • Performance Testing Script
  • Shuffle Pattern Library
  • StaticCCC
  • String Insertion
  • UCD: Unicode Property Database and Compilers
View All Pages