Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to consume json data in JIRA REST API module using Atlassian SDK for JIRA Server plugin dev?

Dhruv Dixit February 25, 2019

I have been trying to consume some data like project name etc from json using "JIRA REST API module" but I did not find any documentation to do so.

Although, there is documentation for "JIRA REST Client Wrappers" on J-tricks which use user authentication but how can I use the "JIRA REST API module" to consume data from json?

The "JIRA REST API module" creates two files inside the plugin i.e. MyResource.java and MyResourceModel.java and an entry in atlassian-plugin.xml.

The above two java files are being used for producing data but how to consume data from json using them?

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2019

Hello,

Try to use the gson library. When you create a plugin for Jira, this library is included by default (check if it is included in the pom.xml file). You can find an example here:

http://tutorials.jenkov.com/java-json/gson.html

Suggest an answer

Log in or Sign up to answer