Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert JSON to CSV
Example ¶
package main import ( "os" "strings" "github.com/Sydsvenskan/json2csv" ) func main() { json2csv.Convert(strings.NewReader(`[ { "foo": "bar", "baz": [{"a":"b"}, 1, 1.3] }, { "foo": "fi fum", "baz": [{"a":"c"}, 3], "extra": "fine" }, "it's JSON, what do you expect?" ]`), os.Stdout) }
Output: baz.0.a,baz.1,baz.2,extra,foo,text b,1,1.3,,bar, c,3,,fine,fi fum, ,,,,,"it's JSON, what do you expect?"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.