Turns out that file is not part of core or framework like I assumed. It’s part of endpointman module which I didn’t have installed according to module admin UI. Turns out there was an old version (v14) installed which showed up when I did fwconsole ma list but wouldn’t let me remove it gracefully. I just deleted that module directory and manually removed the endpointman_* tables. Now I don’t get that error anymore.
Trying to install Endpoint Manager v16 overtop didn’t work because it gave me errors because of the existing tables.
JSON.class.php was originally put into Endpointman because before PHP 8 you could never assume a version of PHP had support for JSON (which is absurd) and at that time FreePBX didn’t really have any hard requirements for PHP extensions like it does now