I have an existing J3 component admin view which fires off a Javascript Ajax call to a Json controller and fetches back data which I then incorporate into that view. I'm trying to replicate how I've done that into a J4 component but I can't seem to get it working.
The controller is at: administrator/components/com_erycdirectory/src/Controller/InputDataController.json.php
The namespace for that controller is Eryc\Component\ErycDirectory\Administrator\Controller, the class name is InputDataController and it extends \JControllerLegacy
The function in this controller that I want to access remotely is called getInputsByDirectoryId() and it is currently set to echo out a json encoded array with a single hard-coded key/value pair in it until I can get it working. Then I'll update it to fetch a model to access the database with.
The Ajax call in the template is being sent to
'index.php?option=com_erycdirectory&task=inputdata.getinputsbydirectoryid&format=json'
The error that comes back is "Invalid controller class: inputdata". Any suggestions as to what I might be missing would be very much appreciated.