Change issue display from Java class to Json file

Hello,
I’m trying to change the error display from java class to json file. My rule works well, but it shows the error in a java class, and I’d like to display it in one of my json files. Can u help me to achieve this? I’ve seen a method of reporting issue with secondary location, but I guess it’s just for java classes. For now I’m also trying to add a new rule to display an error in json file, but I don’t know how to register that new rule. For registering java rules I’m using CheckRegistrar interface which can’t register my json rule. Thanks for help in advance.

SonarQube 8.3