Effectively this will run validation checks on json, which
will produce the errors expected by WebDriver if the input is
not valid.

Arguments:

(number|boolean|string)> json (Object.<string,) – Cookie to be deserialised. name and value are required fields which must be strings. The path and domain fields are optional, but must be a string if provided. The secure, and httpOnly are similarly optional, but must be booleans. Likewise, the expiry field is optional but must be unsigned integer.