Importing GSON to use in custom addon

Skip to first unread message

Aakhash Ganesh

Feb 13, 2023, 2:37:10 PMFeb 13
to OWASP ZAP Developer Group

 I couldn't find this information in the docs anywhere. I would like to use gson in my custom addon code to parse json requests and responses. I tried putting it in a new folder and adding a " implementation(files("libs/gson.jar"))" and other commands. I also tried to put it in the src folder of the addon and try to import ity that way, but I couldn't get it to work. Could someone point me to the documentation or tell me how to do imports for zap custom addons.

Thank you

Feb 13, 2023, 2:44:26 PMFeb 13

Normally one would use the artifacts from Maven Central, e.g.:

But whether it's a local file or one obtained from Maven Central the
declaration is the same, assuming you are using the Gradle Add-on plugin.

In any case you have to provide more details of what's not working.

Best regards.
Reply all
Reply to author
0 new messages