fix jsonize to handle values with quotes

previous version would fail with f.e. val = 'foo"bar'