You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when there is empty items in array:
json: cannot unmarshal array into Go value of type swarm.Resources
I'm trying to update service image. for that I have to first inspect current Service and then pull the whole Spec section then make my changed and then call the service update.
I get this error when there is empty items in array:
json: cannot unmarshal array into Go value of type swarm.Resources
I'm trying to update service image. for that I have to first inspect current Service and then pull the whole Spec section then make my changed and then call the service update.
let say the JSON object is like:
`
{
"Name":"myservice",
"Labels":{
"com.df.distribute":"true",
`
as you see in the JSON the Resource has empty arrays and if I take them off the API will works fine.
the point is using Curl command it works with no error and i dont need to remove emty items.
quick work around for this is that I have to process the array and remove all empty elements.
seems this is like GO error
Docker Version:
`
Client:
Version: 1.12.3-cs3
API version: 1.24
Go version: go1.6.3
Git commit: 781bb16
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.3-cs3
API version: 1.24
Go version: go1.6.3
Git commit: 781bb16
Built:
OS/Arch: linux/amd64
`
The text was updated successfully, but these errors were encountered: