attempts to parse json strings into native ruby objects
175870
def objectify(json_string)
      return nil if json_string.nil? || json_string == ''
      case json_string
      when Hash, Array
        return json_string
      else
        JSON.parse(json_string.to_s)
      end
    rescue Exception
      json_string
    end
1301360
def _parse_json(self, jstring=None):
        """"""

        # Argument error checking.
        assert jstring is not None

        result = None

        try:
            result = json.loads(jstring)
        except (ValueError) as exception:
            msg = 'Unable to convert JSON string to Python data structure.'
            raise APIDataException(exception, jstring, msg)

        return result
489677
def from_json(cls, json):
    
    return cls(json[cls.BLOB_KEY_PARAM],
               json[cls.START_INDEX_PARAM],
               json[cls.END_INDEX_PARAM])
444350
def json_loads(cls, s, **kwargs):
        
        if 'cls' not in kwargs:
            kwargs['cls'] = cls.json_decoder
        return json.loads(s, **kwargs)
650687
function parseJson(text) {
  try {
    var o = JSON.parse(text);
    if (o && typeof o === "object" && o !== null)
      return o;
  }
  catch (e) {}

  return text;
}
877244
def _parse(jsonOutput):
    '''
    
    '''
    parsed={}
    if not jsonOutput:
        return parsed
    
    parsed["status"] = jsonOutput[0]
    if jsonOutput[1] == None or jsonOutput[1] == "":
        return parsed
    realJson = json.loads(jsonOutput[1])

    content = ""
    for js in realJson:
        if "X-TIKA:content" in js:
            content += js["X-TIKA:content"]

    if content == "":
        content = None

    parsed["content"] = content
    parsed["metadata"] = {}

    for js in realJson:
        for n in js:
            if n != "X-TIKA:content":
                if n in parsed["metadata"]:
                    if not isinstance(parsed["metadata"][n], list):
                        parsed["metadata"][n] = [parsed["metadata"][n]]
                    parsed["metadata"][n].append(js[n])
                else:
                    parsed["metadata"][n] = js[n]

    return parsed
694278
def from_json(cls, json_obj):
        
        return cls(json_obj["name"], lb=json_obj["lb"], ub=json_obj["ub"], type=json_obj["type"])
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
53009
function toStringJSON (str) {
  if (isObject(str)) {
    return str
  } else if (isString(str)) {
    try {
      return JSON.parse(str)
    } catch (e) {}
  }
  return {}
}
226694
def _parse_array(value):
    
    value = value.lstrip()
    if not value or value[0] not in _bracket_strings:
        return None
    return json.loads(value)
1022587
def loads(s, encoding=None, cls=JSONTreeDecoder, object_hook=None,
         parse_float=None, parse_int=None, parse_constant=None,
         object_pairs_hook=None, **kargs):
    
    return json.loads(s, encoding, cls, object_hook,
         parse_float, parse_int, parse_constant,
         object_pairs_hook, **kargs)
1041437
def _from_json_array_nested(cls, response_raw):
        

        json = response_raw.body_bytes.decode()
        obj = converter.json_to_class(dict, json)
        value = converter.deserialize(cls, obj[cls._FIELD_RESPONSE])

        return client.BunqResponse(value, response_raw.headers)
181595
def _parse_json(s):
    '  '

    def _obj_hook(pairs):
        ' convert json object to python object '
        o = JsonDict()
        for k, v in pairs.iteritems():
            o[str(k)] = v
        return o
    return json.loads(s, object_hook=_obj_hook)
911966
def json
      @json ||= begin
                  JSON.parse(osc_message.to_a.first)
                rescue => ex
                  puts ex.message
                  {}
                end
    end
802891
def from_json(self, json_string):
        

        obj = json.loads(json_string)
        self.from_dict(obj['groups'], obj['data'])

        return self
463694
def convert_json_object_to_pyr_resource(key, val)
      if resources_include?(key) && val.is_a?(Array)
        objectify(key, val)
      elsif resources_include_singular?(key) && val.is_a?(Hash)
        new_response_object(key, val)
      end
    end
1113826
def from_json(raw):
    
    ncls = None
    _type = raw.get('type')
    try:
        ncls = _type_map[NodeType(_type)]
    except (KeyError, ValueError) as e:
        logger.warning('Unknown node type: %s', _type)
        if DEBUG:
            raise_from(exception.ParseException('Parse error for %s' % (_type), raw), e)
        return None
    node = ncls()
    node.load(raw)

    return node