Hi All,
We are using Python JIRA library to retrieve details about JIRA Project. We are looking to get component information and for that we are using the "project_components" function mentioned in this documentation https://jira.readthedocs.io/examples.html#projects
But the output returned by this function is in a list format and we are unable to convert this list out to JSON format. Can anyone let me know how to parse the below output we are getting from the project_componets function call. Or if there is a better way to components let me know please
[
<JIRA Component: name=u'component1', id=u'componentid1'>,
<JIRA Component: name=u'component2', id=u'componentid2'>
]
Hi,
Welcome to the community
First create a new list with te name of all you components
listeName = [component.name for component in componentList]
then convert the list to json
import json
jsonList = json.dumps(listeName)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.