Skip to content

jonathanhecl/jsonreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonreader

JSON Simple Reader

Requirements

  • A JSON array

Features

  • Read JSON files with headers and rows
  • Don't require an deterministic struct to read

Returned struct

  • Headers []string
  • Rows map[int]map[string]string

Installation

go get github.com/jonathanhecl/jsonreader

Example

import (
    "github.com/jonathanhecl/jsonreader"
)

func main() {
    data, err := jsonreader.LoadFileJSON("example.json")
    // ...
    data2, err := jsonreader.ReadJSON("{\"id\":1,\"father\":\"Mark\",\"mother\":\"Charlotte\",\"children\":2}")
    // ...
}

About

JSON Simple Reader

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages