Set argument as optional to match method signature

The 3rd argument causes error, might be the signature has changed.
Also updated deprecated JSON method to new one.