2024-06-17T07:22:03Z E! [processors.parser::abcparser] could not parse field log_json: invalid character ‘-’ after array element

Hello,

i am getting an issue in telegraf
2024-06-17T07:22:03Z E! [processors.parser::lcmparser] could not parse field log_json: invalid character ‘-’ after array element

[[processor.parser]] parsing the log_json field but i am getting valid and invalid json format in log_json field
if processor.parser found invalid json in the log_json field then it gives the issue

[[inputs.tail]]
alias = “abc-serviceloginput”
files = [“/var/log/containers/abc-service*”]
data_format = “grok”
grok_patterns = [‘(?:%{TIMESTAMP_ISO8601:log_timestamp})(?:%{SPACE})(?:%{WORD:log_stream})(?:%{SPACE})(?:%{WORD:log_type})(?:%{SPACE})(?:%{GREEDYDATA:log_json})’]
tags = {indexname=“abc-service”, abc_service_logs = “abc-service”}

[[processors.parser]]
alias = “abcparser”
tagpass = {abc_service_logs = [“abc-service”] }
parse_fields = [“log_json”]
merge = “override”
data_format = “json”
json_string_fields = [“*”]

[[outputs.elasticsearch]]
alias = “abcoutput”
tagpass = {abc_service_logs = [“abc-service”] }
urls = [“http://of-opensearch-master:9200”]
index_name = “{{indexname}}-%Y.%m.%d”
username = “"
password = "

metric_batch_size = 100

Can you please help me to solve this kind of issue