Importing GSON to use in custom addon

6 views
Skip to first unread message

Aakhash Ganesh

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

 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

thc...@gmail.com

unread,
Feb 13, 2023, 2:44:26 PMFeb 13
to zaproxy...@googlegroups.com
Hi.

Normally one would use the artifacts from Maven Central, e.g.:
https://github.com/zaproxy/zap-extensions/blob/1c623c481915dec6dee96ab24babd1afe42c3807/addOns/retire/retire.gradle.kts#L42

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
Forward
0 new messages