json not being serialised consistently, fix to allow the option of pure json to be posted