This is inspired by the original gist https://gist.github.com/reegnz/5bceb53427008a4ff9367eb8eae97b85 and jqlang/jq#104 (comment)
Copy the above .jq
file to $HOME/.jq
running the command like
< sample-snake-case-request.json | jq 'map_keys(camel_to_snake) | nonulls ' > sample-camel-case-request.json
Converts the json in the file sample-snake-case-request.json, to have all its attributes converted to camel case
nonulls
is optional, to optionally remove attributes that are null