Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> `JSON.parse` and a working subscript operator

https://github.com/ingydotnet/json-bash

    source json.bash
    
    json='{"name":"Jason","friends":["Jimmy","Joe"]}'
    JSON.load "$json"
    joe=$(JSON.get /friends/1)
    JSON.put /friends/2 Jeff
    new_json=$(JSON.dump)
It's still not as trivial as javascript, but "tooth-pullingly difficult" is a little unfair.


Again: sh, not bash. If I have the freedom to specify bash, I can specify something better than bash or sh.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: