I have written a JSON pre-processor in Go.
https://github.com/hnakamur/jsonpreprocess
It does:
- trim comments
- minify (trim comments and whitespaces)
The lexer core implementation is based on
- Lexical Scanning in Go - Rob Pike - YouTube -
http://www.youtube.com/watch?v=HxaD_trXwRE
- http://golang.org/src/pkg/text/template/parse/lex.go
I modified it to use io.Reader instead of string as the input to the lexer.
I think it is better because whole input does not have to be on memory.
Feedbacks are welcome.
Cheers,
Hiroaki
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.