Make json a optional dependency, used by default, with a fallback to PHP serialize