package json
import "github.com/tdewolff/minify/json"
Package json minifies JSON following the specifications at http://json.org/.
Index ¶
Examples ¶
Functions ¶
func Minify ¶
Minify minifies JSON data, it reads from r and writes to w.
Code:
Example¶
{
m := minify.New()
m.AddFuncRegexp(regexp.MustCompile("[/+]json$"), Minify)
if err := m.Minify("application/json", os.Stdout, os.Stdin); err != nil {
panic(err)
}
}
Types ¶
type Minifier ¶
type Minifier struct{}
Minifier is a JSON minifier.
func (*Minifier) Minify ¶
Minify minifies JSON data, it reads from r and writes to w.
Source Files ¶
- Version
- v2.1.0+incompatible
- Published
- Mar 3, 2017
- Platform
- darwin/amd64
- Imports
- 3 packages
- Last checked
- 1 hour ago –
Tools for package owners.