cannot unmarshal string into Go value of type struct #562
Replies: 3 comments
-
You are likely passing the entire json with surrounding quotes, so the json decoder thinks you are trying to decode a string and that doesn't match the programmed json scheme for decoding. |
Beta Was this translation helpful? Give feedback.
-
Hi, So, thats is the wrong way (with quotes): And thats the right way (without quotes): ? Edit: I tried without any quotes but got the same error. |
Beta Was this translation helpful? Give feedback.
-
Edit 2: You'r right! ... the CasaOS editor messed it up... did the right way with nano and now its ok! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
The service is not working for me, its returning a error while reading the config.file.
Log end lines:
2023-11-27T17:09:23Z INFO reading JSON config from file /updater/data/config.json json.go:L45
2023-11-27T17:09:23Z ERROR cannot unmarshal common settings: json: cannot unmarshal string into Go value of type struct { CommonSettings []params.commonSettings "json:"settings"" } main.go:L70
2023-11-27T17:09:23Z INFO Shutdown successful main.go:L84
Config file (hid just host subdomain, username and password):
{
"settings": [
{
"provider": "dynu",
"domain": "api.dynu.com",
"host": "mysub.ddnsgeek.com",
"username": "myusername",
"password": "mypassword",
"ip_version": "ipv4",
"provider_ip": true
}
]
}
Any idea of what am i doing wrong?
Thx in advance for any help!
Beta Was this translation helpful? Give feedback.
All reactions