Dumping MySQL tables to JSON.
Install mysql2json dependency (if not already installed):
$ go get github.com/go-sql-driver/mysql
Then, install in the usual Go way:
$ go get github.com/XuefengHuang/mysql2json
import "github.com/XuefengHuang/mysql2json"
mysql2json.Getjson(username, password, address, database, sql_statement)
mysql2json.Getjson("root", "123456", "127.0.0.1", "test", "select * from test")