Writes the specified json to the skyuxconfig.json file
19882
function writeConfig(json) {
  if (!skyuxConfigOriginal) {
    skyuxConfigOriginal = JSON.parse(fs.readFileSync(skyuxConfigPath));
  }

  fs.writeFileSync(skyuxConfigPath, JSON.stringify(json), 'utf8');
}
1129157
def write_json_plan(self, proposed_layout, proposed_plan_file):
        """"""
        with open(proposed_plan_file, 'w') as output:
            json.dump(proposed_layout, output)
1079488
def write_fits(self, data, outfile, extname="SKYMAP", clobber=True):
        
        hdu_prim = fits.PrimaryHDU()
        hdu_hpx = self.make_hdu(data, extname=extname)
        hl = [hdu_prim, hdu_hpx]
        if self.conv.energy_hdu == 'EBOUNDS':
            hdu_energy = self.make_energy_bounds_hdu()
        elif self.conv.energy_hdu == 'ENERGIES':
            hdu_energy = self.make_energies_hdu()
        if hdu_energy is not None:
            hl.append(hdu_energy)
        hdulist = fits.HDUList(hl)
        hdulist.writeto(outfile, overwrite=clobber)
1245541
function writeConfigServe(port) {
  return new Promise(resolve => {
    _port = port;
    const skyuxConfigWithPort = merge(true, skyuxConfigOriginal, {
      app: {
        port: port
      }
    });

    writeConfig(skyuxConfigWithPort);
    const args = [cliPath, `serve`, `-l`, `none`, `--logFormat`, `none`];
    webpackServer = childProcessSpawn(`node`, args, cwdOpts);
    resetConfig();
    resolve();
  });
}
886759
public void writeJSON(JSONValue jc, JSONWriter jb, boolean writeClass)
            throws IOException {
        String key;
        Object value;
        jb.objectBegin();
        for (Map.Entry<String, Object> entry : objectMap.entrySet()) {
            key = entry.getKey();
            jb.objectItem(key);
            value = entry.getValue();
            if (value == null)
                jb.valueNull();
            else
                jc.writeValue(value, jb, writeClass);
        }
        jb.objectEnd();
    }
794898
def write_config(path, shape=None, dtype=None, name="conf.json", overwrite=True, credentials=None):
    
    import json
    from thunder.writers import get_file_writer

    writer = get_file_writer(path)
    conf = {'shape': shape, 'dtype': str(dtype)}

    confwriter = writer(path, name, overwrite=overwrite, credentials=credentials)
    confwriter.write(json.dumps(conf, indent=2))

    successwriter = writer(path, "SUCCESS", overwrite=overwrite, credentials=credentials)
    successwriter.write('')
788736
function writeLocalJson(source, rootFolder) {
    // Write to local.json
    const local = path.join(rootFolder, constants.META_DIR, constants.META_LOCAL);
    const file = {
        name: local,
        source: JSON.stringify(source),
    };
    createFile(file);
}
125085
async function writeExportsToJsonFile(to, customMedia, customProperties, customSelectors) {
	const jsonContent = JSON.stringify({
		'custom-media': customMedia,
		'custom-properties': customProperties,
		'custom-selectors': customSelectors
	}, null, '  ');
	const json = `${jsonContent}\n`;

	await writeFile(to, json);
}
1085451
def _write_json(self, message, extra):
        '''
        
        '''
        self.logger.info(message, extra=extra)
1027284
def write_as_json(blob, dest, indent=0, sort_keys=True):
    
    opened_out = False
    if is_str_type(dest):
        out = codecs.open(dest, mode='w', encoding='utf-8')
        opened_out = True
    else:
        out = dest
    try:
        json.dump(blob, out, indent=indent, sort_keys=sort_keys)
        out.write('\n')
    finally:
        out.flush()
        if opened_out:
            out.close()
267412
def write_options_to_JSON(self, filename):
        
        fd = open(filename, "w")
        fd.write(json.dumps(_options_to_dict(self.gc), indent=2,
                            separators=(',', ': ')))
        fd.close()
321684
def write(self):
        """"""
        with open(self.log_path, "w") as f:
            json.dump(self.log_dict, f, indent=1)
890989
def write_json(obj, path):
    """"""
    obj_str = text_type(json.dumps(obj, indent=4, separators=(",", ": "),
                                   ensure_ascii=False))

    helpers.ensure_dir_exists(os.path.dirname(path))

    with io.open(path, "w", encoding='utf-8') as target:
        target.write(obj_str)
1302669
public static void writeJSON(Map<String, ? extends Object> map, Appendable out, JSONStyle compression)
			throws IOException {
		if (map == null) {
			out.append("null");
			return;
		}
		JsonWriter.JSONMapWriter.writeJSONString(map, out, compression);
	}
777613
def save_blob_as_json(filename, blob, force_write, debug):
    
    try:
        if prompt_4_overwrite(filename, force_write):
            with open(filename, 'wt') as f:
                print('%s' % json.dumps(blob, indent=4 if debug else None, separators=(',', ': '), sort_keys=True, cls=CustomJSONEncoder), file=f)
    except Exception as e:
        printException(e)
        pass
126606
def write_json(data, filename, gzip_mode=False):
    ''''''

    open_file = open
    if gzip_mode:
        open_file = gzip.open

    try:
        with open_file(filename, 'wt') as fh:
            json.dump(obj=data, fp=fh, sort_keys=True)
    except AttributeError:
        # Python-2.6
        fh = open_file(filename, 'wt')
        json.dump(obj=data, fp=fh, sort_keys=True)
        fh.close()
103805
private void writeJsonObjectBegin(BaseContext context) throws TException {
        getCurrentContext().write();
        if (getCurrentContext().isMapKey()) {
            pushWriter(new ByteArrayOutputStream());
        }
        pushContext(context);
        try {
            getCurrentWriter().writeStartObject();
        } catch (IOException ex) {
            throw new TException(ex);
        }
    }