Skip to content

Repository files navigation

@jsonic/csv

A Jsonic syntax plugin that parses CSV text into objects or arrays, with support for headers, quoted fields, custom delimiters, streaming, and strict/non-strict modes. Available for TypeScript and Go.

npm versionbuildCoverage StatusKnown VulnerabilitiesDeepScan gradeMaintainability

VoxgigThis open source module is sponsored and supported by Voxgig.

Quick example

TypeScript

import{Jsonic}from'jsonic'import{Csv}from'@jsonic/csv'constparse=Jsonic.make().use(Csv)parse("name,age\nAlice,30\nBob,25")// [{ name: 'Alice', age: '30' }, { name: 'Bob', age: '25' }]parse('a,b\n1,"hello, world"')// [{ a: '1', b: 'hello, world' }]

Go

import (
csv "github.com/jsonicjs/csv/go"
jsonic "github.com/jsonicjs/jsonic/go"
)
j:=jsonic.Make()
j.UseDefaults(csv.Csv, csv.Defaults)
result, _:=j.Parse("name,age\nAlice,30\nBob,25")
// [map[name:Alice age:30] map[name:Bob age:25]]

Documentation

Full documentation following the Diataxis framework (tutorials, how-to guides, explanation, reference):

License

Copyright (c) 2021-2025 Richard Rodger and other contributors, MIT License.

About

CSV parser that plays nice with JSON

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from jsonicjs/directive