How to change JSON response output format? #520
-
| 
         Greetings! I am running a request of the form: ### basic get statement
GET https://api.github.com/users/boltlessengineer
user-agent: neovimAnd I get a response in the form of: ### basic get statement
GET https://api.github.com/users/boltlessengineer
HTTP/2 200 
# @_RES (formatted)
{"login":"boltlessengineer","id":60088301,"node_id":"MDQ6VXNlcjYwMDg4MzAx","avatar_url":"https://avatars.githubusercontent.com/u/60088301?v=4","gravatar_id":"","url":"https://api.github.com/users/boltlessengineer","html_url":"https://github.com/boltlessengineer","followers_url":"https://api.github.com/users/boltlessengineer/followers","following_url":"https://api.github.com/users/boltlessengineer/following{/other_user}","gists_url":"https://api.github.com/users/boltlessengineer/gists{/gist_id}","starred_url":"https://api.github.com/users/boltlessengineer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boltlessengineer/subscriptions","organizations_url":"https://api.github.com/users/boltlessengineer/orgs","repos_url":"https://api.github.com/users/boltlessengineer/repos","events_url":"https://api.github.com/users/boltlessengineer/events{/privacy}","received_events_url":"https://api.github.com/users/boltlessengineer/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Seongmin Lee","company":null,"blog":"https://boltless.me","location":null,"email":null,"hireable":true,"bio":"Student developer","twitter_username":null,"public_repos":48,"public_gists":0,"followers":42,"following":7,"created_at":"2020-01-20T06:50:13Z","updated_at":"2025-02-05T04:52:36Z"}
# @_ENDHow do I change the configuration file settings so that the JSON response is processed with  $ curl -s -A "neovim" -L 'https://api.github.com/users/boltlessengineer' | jq '.'
{
  "login": "boltlessengineer",
  "id": 60088301,
  "node_id": "MDQ6VXNlcjYwMDg4MzAx",
  "avatar_url": "https://avatars.githubusercontent.com/u/60088301?v=4",
  "gravatar_id": "",
  "url": "https://api.github.com/users/boltlessengineer",
  "html_url": "https://github.com/boltlessengineer",
  "followers_url": "https://api.github.com/users/boltlessengineer/followers",
  "following_url": "https://api.github.com/users/boltlessengineer/following{/other_user}",
  "gists_url": "https://api.github.com/users/boltlessengineer/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/boltlessengineer/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/boltlessengineer/subscriptions",
  "organizations_url": "https://api.github.com/users/boltlessengineer/orgs",
  "repos_url": "https://api.github.com/users/boltlessengineer/repos",
  "events_url": "https://api.github.com/users/boltlessengineer/events{/privacy}",
  "received_events_url": "https://api.github.com/users/boltlessengineer/received_events",
  "type": "User",
  "user_view_type": "public",
  "site_admin": false,
  "name": "Seongmin Lee",
  "company": null,
  "blog": "https://boltless.me",
  "location": null,
  "email": null,
  "hireable": true,
  "bio": "Student developer",
  "twitter_username": null,
  "public_repos": 48,
  "public_gists": 0,
  "followers": 42,
  "following": 7,
  "created_at": "2020-01-20T06:50:13Z",
  "updated_at": "2025-02-05T04:52:36Z"
}My configuration file  return {
  "rest-nvim/rest.nvim",
  ft = "http",
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
    opts = function(_, opts)
      opts.ensure_installed = opts.ensure_installed or {}
      table.insert(opts.ensure_installed, "http")
    end,
  },
}Thank you!  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            boltlessengineer
          
      
      
        Feb 18, 2025 
      
    
    Replies: 1 comment
-
| 
         Seems to be a duplicate of #417. See this comment: #414 (comment) on how to configure the plugin to use   | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        welken23
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Seems to be a duplicate of #417. See this comment: #414 (comment) on how to configure the plugin to use
jqas a formatter.