csv2json: github.com/morcmarc/csv2json/converter Index | Files

package converter

import "github.com/morcmarc/csv2json/converter"

The converter package handles conversion between csv and json


Package Files

converter.go records.go

type Converter Uses

type Converter struct {
    // contains filtered or unexported fields

func NewConverter Uses

func NewConverter(csvInput *os.File, jsonOutput *os.File) *Converter

Returns a new Converter for the given input and output

func (*Converter) Run Uses

func (c *Converter) Run()

Processes the input and writes converted objects onto the output

type Records Uses

type Records struct {
    Fields  []string
    TypeMap map[string]interface{}

func NewRecords Uses

func NewRecords(fields []string, typeMap map[string]interface{}) *Records

func (*Records) Convert Uses

func (r *Records) Convert(line []string) map[string]interface{}

Package converter imports 7 packages (graph) and is imported by 1 packages. Updated 2016-07-24. Refresh now. Tools for package owners.