script: JSON encode the payload