Check for json dependency, fixes #378