Failed unmarshalling json: invalid character ':' after array element


#1

getting subject error. how do I resolve it ?

{
"network": {
"servers": [localhost:5043" ],
"timeout": 15
},

"files": [
"paths:" [
"/data/logs/cog*.log"
],

 "fields": [ "type": "xxxlog" ]

]
}


(Magnus Bäck) #2

Change

"fields": [ "type": "xxxlog" ]

to

"fields": { "type": "xxxlog" }


#3

tried your suggestion still getting same error


(Magnus Bäck) #4

There's also a missing double quote right before "localhost". And after "paths" you've mixed up the order of the double quote and the colon.

The file format is standard JSON so you can save yourself some time and validate it on e.g. http://jsonlint.com/.


(system) #5