I am POST'ing the following data to our server's v2 API using Python's request library.
"customfield_10300": "8lbs 3oz",
I get an error:
"customfield_10315": "Can not instantiate value of type [simple type, class com.atlassian.jira.issue.fields.rest.json.bean.CustomFieldOptionJsonBean] from JSON String; no single-String constructor/factory method (through reference chain: com.atalassianl.jira.issue.fields.rest.json.beans.CustomFieldOptionJsonBean[\"child\"])"
Is my JSON incorrectly formatted?
Where could I have gone to figure this out on my own? I unsuccessfully tried searching the documentation. I also tried googling a solution, but the results all seemed to indicate those people were double-encoding their JSON strings by accident, which I don't think I am doing.
Gotcha, and thanks. A few more ideas:
You may want to check out the REST API call to create issue, which uses the ID values rather than the names for such JSON access. I cannot tell what transaction you are calling to know if that is relevant:
Next, to confirm you are accessing the correct smart values/field names, you could make a call to the REST API with an example issue to check. Here's an explanation of that:
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events