Jenkins NotSerializableException: Groovy.json.internal.Lazymap

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Jenkins NotSerializableException: Groovy.json.internal.Lazymap

by Anonymous » 23 Feb 2025, 23:46

Ich versuche, die Jenkins -Pipeline zu verwenden, um die API -Nutzlast auf den Apiurl1 -Läufen ohne Probleme zu zeigen, aber auf dem Apiurl2 zeigen, dass ein Fehler aufgetreten ist: java.io.notserializableException: Groovy.json.internal.lazymap

Code: Select all

try{
final String response = sh(script: """curl -svf --globoff --request GET --header "Authorization: Bearer ${token}" "$apiUrl" """, returnStdout: true).trim()

// Parse API response
def jsonSlurper = new groovy.json.JsonSlurper()
def result = jsonSlurper.parseText(response)
String testingResponse = result.toString()
echo testingResponse

def payload = result.data
for (def jobTitleList in payload) {
def jobTitleName = jobTitleList.job_title_id.job_title
jobTitles

Top