This blog post captures some quick commands to deal with JSON from servers (Http APIs) using curl and jq command line tools About Jq: https://stedolan.github.io/jq/ Install jq: Mac: brew install jq Ubuntu or Debian: sudo apt-get install jq Sample JSON content: Assume the following JSON content will be returned from URL http://api.example.com/some-json-content { "user_name": "User 123", "some_other_field": { "sub_field": "sub_value" }, "array_field": [ { "field1": "value1", "field2": "value2" }, { "field1": "value3", "field2": "value4" } ] } UR...
Comments
Post a Comment