utils for shell using JSON