Allow passing arguments as json

also allows empty string as replacement