项目作者: go-jsonfile

项目描述 :
JSON File
高级语言: Go
项目地址: git://github.com/go-jsonfile/jsonfile.git
创建时间: 2016-10-30T21:23:55Z
项目社区:https://github.com/go-jsonfile/jsonfile

开源协议:MIT License

下载


Go JSON File Handling

This package provides simple wrapping around saving and reading JSON files (streams) in GO. It exists because way too many sample/demo code are doing it the wrong way. Wrong in the sense of efficiency — when reading JSON from file for example, the right is to read from stream, instead of reading the whole file via ioutil.ReadAll into a big buffer first then decode the buffer next.

Every single hit I searched, for “JSON files reading writing”, is doing reading like this. They are actually not wrong, but just not ideal, especially when it comes to big JSON files.

Hence, this simple JSON files reading writing wrapping package.

Examples