saves the config parameters to a json file
960980
def save_yaml(self, outFile):
        """"""
        with open(outFile,'w') as myfile:
            print(yaml.dump(self.params), file=myfile)
463239
def save_input_meta(self):
        
        options = self.options
        file_path = os.path.join(options.outputdir, 'input.meta.json')
        with open(file_path, 'w') as outfile:
            json.dump(vars(options), outfile)
617359
def _load_config():
    """"""
    fname = _get_config_fname()
    if fname is None or not op.isfile(fname):
        return dict()
    with open(fname, 'r') as fid:
        config = json.load(fid)
    return config
663233
def input_parameter_json
      tmp_params = []
      @input_parameters.each_value { |v| tmp_params << v.as_struct if v.set? }
      param_struct = { parameters: tmp_params }
      param_struct.to_json
    end
298388
def save_json(self, fname='servers.json'):
        '''
            
        '''
        rows = sorted(self.keys())
        with open(fname, 'wt') as fp:
            json.dump([self[k] for k in rows], fp, indent=1)
75761
def save_params(model_name: str):
    """"""
    with open(model_name + '.params', 'w') as f:
        json.dump(pr.__dict__, f)
751177
def build_configuration_parameters(app):
    """"""
    env = Environment(loader=FileSystemLoader("{0}/_data_templates".format(BASEPATH)))
    template_file = env.get_template("configuration-parameters.j2")
    data = {}
    data["schema"] = Config.schema()
    rendered_template = template_file.render(**data)
    output_dir = "{0}/configuration/generated".format(BASEPATH)
    with open("{}/parameters.rst".format(output_dir), "w") as f:
        f.write(rendered_template)
1209622
def save(self, filename, verbose=False):
        
        with open(filename, 'w') as fid:
            json.dump(self._conf, fid, indent=4)
        if verbose:
            print('Saved settings in ' + filename)
284111
def export_to_json(env):
    
    json_fl = env['scripts'] + "/config.JSON"
    with open(json_fl, 'w') as fh:
        fh.write(json.dumps(env, sort_keys=True, indent=4,
                            separators=(',', ': ')))
91293
def _save_json(self, filename):
        """"""
        with open(filename, 'w') as file_handle:
            json.dump(self._sensors, file_handle, cls=MySensorsJSONEncoder,
                      indent=4)
            file_handle.flush()
            os.fsync(file_handle.fileno())
277248
def store_json(self, filename, dict_to_store):
        """"""
        filename = os.path.join(
            self.data_dir,
            filename + '.data'
        )
        fileops.dump_dict_to_file(
            dict_to_store,
            filename
        )
1262358
def set_params(method, params):
    """"""
    data = {'method': method, 'params': params, 'id': str(uuid4())}
    return json.dumps(data)
1158210
def write_config(params, config_path=None):
    
    if config_path is None:
        config_path = tempfile.mktemp(prefix="mongo-")

    cfg = params.copy()
    if 'setParameter' in cfg:
        set_parameters = cfg.pop('setParameter')
        try:
            for key, value in set_parameters.items():
                cfg['setParameter = ' + key] = value
        except AttributeError:
            reraise(RequestError,
                    'Not a valid value for setParameter: %r '
                    'Expected "setParameter": {<param name> : value, ...}'
                    % set_parameters)

    # fix boolean value
    for key, value in cfg.items():
        if isinstance(value, bool):
            cfg[key] = json.dumps(value)

    with open(config_path, 'w') as fd:
        data = '\n'.join('%s=%s' % (key, item) for key, item in cfg.items())
        fd.write(data)
    return config_path
608268
public function saveConfVars()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        oxAdminDetails::save();

        $sShopId = $myConfig->getShopId();

        $sModule = $this->_getModuleForConfigVars();

        foreach ($this->_aConfParams as $sType => $sParam) {
            $aConfVars = $myConfig->getRequestParameter($sParam);
            if (is_array($aConfVars)) {
                foreach ($aConfVars as $sName => $sValue) {
                    $myConfig->saveShopConfVar(
                        $sType,
                        $sName,
                        $this->_serializeConfVar($sType, $sName, $sValue),
                        $sShopId,
                        $sModule
                    );
                }
            }
        }
    }
123695
def save_config(path, config):
    """"""
    import json
    config['version'] = 1
    with open(path, 'w') as f:
        json.dump(config, f)
1272262
def _write_config(self):
        ''''''
        param_dict = {
            'url': self._params.url,
            'snapshot_paths': self._params.snapshot_paths,
            'wait_time': self._params.wait_time,
            'num_scrolls': self._params.num_scrolls,
            'smart_scroll': self._params.smart_scroll,
            'snapshot': self._params.snapshot,
            'viewport_width': self._params.viewport_size[0],
            'viewport_height': self._params.viewport_size[1],
            'paper_width': self._params.paper_size[0],
            'paper_height': self._params.paper_size[1],
            'custom_headers': self._params.custom_headers,
            'page_settings': self._params.page_settings,
        }

        if self._params.event_log_filename:
            param_dict['event_log_filename'] = \
                os.path.abspath(self._params.event_log_filename)

        if self._params.action_log_filename:
            param_dict['action_log_filename'] = \
                os.path.abspath(self._params.action_log_filename)

        config_text = json.dumps(param_dict)

        self._config_file.write(config_text.encode('utf-8'))

        # Close it so the phantomjs process can read it on Windows
        self._config_file.close()
645766
def format_json(config):
    
    with open(config) as fh:
        print(json.dumps(yaml.safe_load(fh.read()), indent=2))