Try to parse json uri encoded strings in inputs
This commit is contained in:
@@ -146,8 +146,13 @@ metadata.plugin = async function({__plugins, name, logger}) {
|
|||||||
value = JSON.parse(value)
|
value = JSON.parse(value)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
logger(`metrics/inputs > failed to parse json : ${value}`)
|
try {
|
||||||
value = JSON.parse(defaulted)
|
value = JSON.parse(decodeURIComponent(value))
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
logger(`metrics/inputs > failed to parse json : ${value}`)
|
||||||
|
value = JSON.parse(defaulted)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user