Use json object instead of query string

Changes were missed in previous commit