Bug: Can not handle [ ] in config.json #567

Closed
opened 2025-11-20 04:25:02 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @NQK on GitHub (Nov 13, 2025).

I am trying to work on the config.json file (it worked for a long time) and now it doesn't anymore. I'm using the latest version on Windows 10, 64bit.

{
  "settings": [
   {
    {
      "provider": "freedns",
      "domain": "qc.to",
      "host": "myhost",
      "token": "my token",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    },
    {
      "provider": "freedns",
      "domain": "fr.to",
      "host": "myhost",
      "token": "my token",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    }
  ]
}

The error is:

2025-11-14T09:45:28+07:00 ERROR cannot unmarshal common settings: json: cannot unmarshal object into Go struct field .settings of type []params.commonSettings

Originally created by @NQK on GitHub (Nov 13, 2025). I am trying to work on the config.json file (it worked for a long time) and now it doesn't anymore. I'm using the latest version on Windows 10, 64bit. ``` { "settings": [ { { "provider": "freedns", "domain": "qc.to", "host": "myhost", "token": "my token", "ip_version": "ipv4", "ipv6_suffix": "" }, { "provider": "freedns", "domain": "fr.to", "host": "myhost", "token": "my token", "ip_version": "ipv4", "ipv6_suffix": "" } ] } ``` The error is: `2025-11-14T09:45:28+07:00 ERROR cannot unmarshal common settings: json: cannot unmarshal object into Go struct field .settings of type []params.commonSettings `
Author
Owner

@NQK commented on GitHub (Nov 13, 2025):

Ha, I looked at the json again and remove a pair of { } and it worked.

{
  "settings": [
    {
      "provider": "freedns",
      "domain": "qc.to",
      "host": "myhost",
      "token": "my token",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    },
    {
      "provider": "freedns",
      "domain": "fr.to",
      "host": "myhost",
      "token": "my token",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    }
  ]
}
@NQK commented on GitHub (Nov 13, 2025): Ha, I looked at the json again and remove a pair of { } and it worked. ``` { "settings": [ { "provider": "freedns", "domain": "qc.to", "host": "myhost", "token": "my token", "ip_version": "ipv4", "ipv6_suffix": "" }, { "provider": "freedns", "domain": "fr.to", "host": "myhost", "token": "my token", "ip_version": "ipv4", "ipv6_suffix": "" } ] } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#567