get display mode only when it matters
fix json when unsetting element in array

I thought this bug was already fixed but this might be due to my recent changes in this code base.
fix regression on deploy taskjobs behavior

In 0.83, Deploy jobs was sent in a single json to agents.