Follow these steps to expose visitor data by json API:
Create view of "vistior" entity type of rest export
Then add required path/url like: jsonapi/views/visitors in path setting
Select "json" format by click on setting link > that next to serializer format
you can select field or entity as per requirement
In the access you can select any option as per requirement or can keep unrestricted as well (testing purpose)
Save the view & try to hit the view page, result 'll start appear
Note:There is no need to configure any additional permission.
if you try to check in this file here is routes() function Try to get entity_type value it is empty due to which code return & getting 404 page not found error. so JSON:API Views" module not support/extend to "visitor" module functionality
There are some approaches that you can follow:
either extend "json api view" module functionality so that it supports vistor entity it requires custom workaround
create custom json api which is also custom workaround
Create REST export view as mentioned in answer