Add a "view in JSON" local task
You need to configure URL options in links.task.yml file. See Url::fromUri for details.

your_module.export:
  title: Export
  route_name: entity.node.canonical
  options:
    query: {_format: json}
  base_route: entity.node.canonical