Saves the json object to the given file
976680
public static void saveJson(File json, Object object) throws IOException {
        objectMapper.writer().writeValue(json, object);
    }
783782
def save(self):
        
        with open(self.filename, 'w') as f:
            ujson.dump(self.config, f, indent=4)
927640
def save(self, file):
        
        d = {
            'framerate': self.framerate,
            'positions': self._timed_positions,
        }
        json.dump(d, file, indent=2)
340273
def _serialize_json(obj, fp):
    
    json.dump(obj, fp, indent=4, default=serialize)
608559
def save_to_file(self, path):
        

        with open(path, 'w') as out:
            out.write(json.dumps(self.get_dict()))
883337
def saveAsJSON(self, fp):
        
        first = True
        for record in self.records():
            if first:
                print(dumps(self.params, separators=(',', ':')), file=fp)
                first = False
            print(dumps(self._convertBlastRecordToDict(record),
                        separators=(',', ':')), file=fp)
89159
function __save(filename, content, json){
  json = json === true

  if (json) {
    fs.writeFileSync(filename, JSON.stringify(content))
  } else {
    fs.writeFileSync(filename, content)
  }
}
837502
def write_json_to_temp_file(data):
    """"""
    fp = tempfile.NamedTemporaryFile(delete=False)
    fp.write(json.dumps(data).encode('utf-8'))
    fp.close()
    return fp.name
735407
def to_output(self, value):
        """"""
        return json.loads(resolwe_runtime_utils.save_file(self.name, value.path, *value.refs))
15649
def json2file(data, filename, encoding='utf-8'):
    
    with codecs.open(filename, "w", encoding=encoding) as f:
        json.dump(data, f, ensure_ascii=False, indent=4, sort_keys=True)
932424
def save(self):
        """"""
        data = str.encode( json.dumps(self.simpleAttrs, indent=4, sort_keys=True) )
        with open(self.filename, "wb") as f:
            f.write(data)
501582
def json_to_file(data, filename, pretty=False):
    ''''''
    kwargs = dict(indent=4) if pretty else {}
    dirname = os.path.dirname(filename)
    if not os.path.exists(dirname):
        os.makedirs(dirname)
    dump = json.dumps(api.__schema__, **kwargs)
    with open(filename, 'wb') as f:
        f.write(dump.encode('utf-8'))
549944
private Object convertFile(Object name) throws IOException, JSONException{
    if (name instanceof String) {
      String file = (String) name;
      JSONObject json = getJsonConfig(file);
      if (json!=null) {
        return json;
      }
    } else if (name instanceof Path) {
        Path file = (Path)name;
        JSONObject json = getJsonConfig(file);
        if (json != null) {
          return json;
        }
    } 
    return name;
  }
1129974
def save(self, filename):
        ''' 
        '''
        with open(filename, 'w') as outfile:
            json.dump(self.to_json(), outfile)
1260824
protected function saveCredentialJson(string $file, $data)
    {
        $content = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_PRETTY_PRINT);
        $this->filesystem->dumpFile($file, $content);
    }
205739
def write_json_to_file(self, net_type, filename, indent='no-indent'):
    '''
    
    '''
    export_data.write_json_to_file(self, net_type, filename, indent)
76227
public static function saveJson($path, $file, array $data)
    {
        $fp = fopen(self::cleanPath($path) . self::DS . $file . '.json', 'w');
        fwrite($fp, json_encode($data));

        return fclose($fp);
    }