REST API thing creation with Powershell

I created a Powershell (yes I mainly work on Windows…) which creates my things via json files. This is working fine as long as there are no Channels defined, and more specific when there are no [objects] in the config.
The strange thing is when I paste the same json text in the API explorer, it’s working fine.

When I remove the Configuration part in the channels object, it’s working, but offcourse without my config.

This is the error I receive:

"{\"error\":{\"message\":\"java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 24 column 25 path $.channels[0].configuration\",\"http-code\":500,\"exception\":{\"class\":\"com.google.gson.JsonSyntaxException\",\"message\":\"java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 24 column 25 path $.channels[0].configuration\",\"localized-message\":\"java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 24 column 25 path $.channels[0].configuration\",\"cause\":\"java.lang.IllegalStateException\"}}}"
{
    "label": "SNMP Synology",
    "configuration": {
        "retries": 2,
        "hostname": "192.168.0.0",
        "protocol": "v2c",
        "port": 161,
        "refresh": 60,
        "community": "public",
        "timeout": 1500
    },
    "properties": [],
    "UID": "snmp:target:synonas",
    "thingTypeUID": "snmp:target",
    "channels": [
        {
            "uid": "snmp:target:synonas:systemStatus",
            "id": "systemStatus",
            "channelTypeUID": "snmp:number",
            "itemType": "Number",
            "kind": "STATE",
            "label": "System State",
            "description": "",
            "configuration": {
                "oid": ".1.3.6.1.2.1.25.3.2.1.3.196608"
            }
        }
    ],
    "location": "basement"
}