Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import java.util.regex.PatternSyntaxException
import java.util.Iterator
import com.google.gson.JsonParser
import com.google.gson.JsonObject
import com.google.gson.JsonElement
import com.google.gson.GsonBuilder
import com.google.gson.Gson


/**
Expand Down Expand Up @@ -68,9 +69,10 @@ class AnsibleSetStatsFilterPlugin implements LogFilterPlugin{
String jsonString = match.group(1)
JsonObject obj = JsonParser.parseString(jsonString).getAsJsonObject()
Iterator<String> keys = obj.keySet().iterator()
Gson gson = new GsonBuilder().create()
while(keys.hasNext()) {
String key = keys.next()
String value = obj.get(key).getAsString()
String value = gson.toJson(obj.get(key))
allData[key] = value
outputContext.addOutput("data", key, value)
}
Expand Down