go-script-bash
go-script-bash copied to clipboard
JSON parser/emitter module
Thinking about #35 and researching options, I'm thinking it might not be too difficult to write a pure Bash JSON parser/emitter module. It would probably borrow much of the interface from JSON.sh, but avoid using grep, pipes, etc. (Unlike JSON.sh, it'll be Bash 3.2+ specific.)
Once the module is in place, emitting JSON logs (and testing the behavior of such) should prove cleaner and easier.
I may also refer to Douglas Crockford's JSON parser reference implementations (though with care, given the lack of tests).