Create :class:`.resources.Asset` from JSON.

        :param json: JSON dict.
        :return: Asset instance.
421401
def create_asset(json):
        
        result = Asset(json['sys'])
        file_dict = json['fields']['file']
        result.fields = json['fields']
        result.url = file_dict['url']
        result.mimeType = file_dict['contentType']
        return result
500161
def from_json(cls, filename):
        
        with open(filename) as fp:
            raw = json.load(fp)

        return cls(raw['stimuli'], raw['inhibitors'], raw['readouts'])
404813
def from_json(cls, json):
    
    if json["name"] in _KEYRANGES_CLASSES:
      return _KEYRANGES_CLASSES[json["name"]].from_json(json)
    raise ValueError("Invalid json %s", json)
750362
def from_json(cls, key):
        
        obj = cls()
        try:
            jkey = json_decode(key)
        except Exception as e:  # pylint: disable=broad-except
            raise InvalidJWKValue(e)
        obj.import_key(**jkey)
        return obj
278879
@Override
    protected Asset readJson(final String assetId) throws IOException, BadVersionException {
        ZipFile zip = createZipFile();

        ZipEntry entry = createFromRelative(assetId + ".json");

        if (entry != null) {
            InputStream is = null;
            try {
                is = zip.getInputStream(entry);
                Asset ass = processJSON(is);
                return ass;
            } finally {
                if (is != null) {
                    is.close();
                }
                zip.close();
            }
        } else {
            zip.close();
            throw new IOException("The asset " + assetId + " does not exist");
        }
    }
1098724
def from_json(cls, string):
        """"""
        obj = json.loads(string)
        return cls(obj['regexp'], obj['files'])
115736
def from_json(cls, json):
    
    result = super(_ReducerReader, cls).from_json(json)
    result.current_key = _ReducerReader.decode_data(json["current_key"])
    result.current_values = _ReducerReader.decode_data(json["current_values"])
    return result
764388
def asset(self, id):
        
        data = None
        if int(id) > 0:
            url = self._build_url('releases', 'assets', str(id),
                                  base_url=self._api)
            data = self._json(self._get(url, headers=Release.CUSTOM_HEADERS),
                              200)
        return Asset(data, self) if data else None
1131998
def instantiate_references_json(references_json):
    ''' 

    '''

    # Create all instances, but without setting their props
    references = {}
    for obj in references_json:
        obj_id = obj['id']
        obj_type = obj.get('subtype', obj['type'])

        cls = get_class(obj_type)
        instance = cls.__new__(cls, id=obj_id)
        if instance is None:
            raise RuntimeError('Error loading model from JSON (type: %s, id: %s)' % (obj_type, obj_id))
        references[instance.id] = instance

    return references
897781
def from_json(cls, path, fatal=True, logger=None):
        
        result = cls()
        result.load(path, fatal=fatal, logger=logger)
        return result
416915
def _create_json(self):
        
        data_json = {
            "name": self.name,
            "includesPattern": self.includesPattern,
            "excludesPattern": self.excludesPattern,
            "repositories": self._repositories,
            "principals": {
                'users': self._users,
                'groups': self._groups,
            }
        }
        return data_json
867970
def from_json(cls, json):
        """"""
        obj = cls(name=json['name'],
                  code=json['code'],
                  numeric_code=json['numeric_code'],
                  symbol=json['symbol'],
                  exponent=json['exponent'],
                  entities=json['entities'],
                  withdrawal_date=json['withdrawal_date'],
                  subunits=json['subunits'])
        return obj
694278
def from_json(cls, json_obj):
        
        return cls(json_obj["name"], lb=json_obj["lb"], ub=json_obj["ub"], type=json_obj["type"])
1137418
def json(self, *,  # type: ignore
             loads: Callable[[Any], Any]=json.loads) -> None:
        
        return loads(self.data)
749228
def from_json(cls, json_dump):
        
        context = cls()
        if json_dump is None:
            return None
        ctxt = json.loads(json_dump)
        for k in ctxt:
            context[k] = ctxt[k]
        return context
449006
public static Object fromJson(String json) {
    try {
      JSONObject jsonObject = new JSONObject(json);
      if (jsonObject.has("JSON")) {
        return convert(jsonObject.get("JSON"));
      } else {
        return convert(jsonObject);
      }
    } catch (Exception e) {
      throw new RuntimeException("json=" + json, e);
    }
  }
694318
public static NeuralNetConfiguration fromJson(String json) {
        ObjectMapper mapper = mapper();
        try {
            NeuralNetConfiguration ret = mapper.readValue(json, NeuralNetConfiguration.class);
            return ret;
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }