Returns the length of the string JSON value under ``path`` at key
        ``name``
553253
def jsonstrlen(self, name, path=Path.rootPath()):
        
        return self.execute_command('JSON.STRLEN', name, str_path(path))
276278
function (name) {
  var n = path.extname(name).length;
  return n === 0 ? name : name.slice(0, -n);
}
173830
def json_path_components(path):
    
    if isinstance(path, str):
        path = path.split('.')

    return list(path)
504514
private static int getMaxStringLength(String[] names) {
		int size = 0;
		for(String s : names) {
			if(s.length()>size) {
				size = s.length();
			}
		}
		return size;
	}
245161
def read_json(file_path):
    
    try:
        with open(file_path, 'r') as f:
            config = json_tricks.load(f)
    except ValueError:
        print('    '+'!'*58)
        print('    Woops! Looks the JSON syntax is not valid in:')
        print('        {}'.format(file_path))
        print('    Note: commonly this is a result of having a trailing comma \n    in the file')
        print('    '+'!'*58)
        raise

    return config
668857
def jsonget(self, name, *args):
        
        pieces = [name]
        if len(args) == 0:
            pieces.append(Path.rootPath())
        else:
            for p in args:
                    pieces.append(str_path(p))

        # Handle case where key doesn't exist. The JSONDecoder would raise a
        # TypeError exception since it can't decode None
        try:
            return self.execute_command('JSON.GET', *pieces)
        except TypeError:
            return None
1012103
function len(srcObj) {
      if (isObj(srcObj)) {
        return keys(srcObj).length;
      }
      else if (typeOf(srcObj, 'str', 'arr', 'fun') || get(srcObj, 'length', 'num')) {
        return srcObj.length;
      }
      else return -1;
    }
1069947
def _form_key_str(path):
    
    if path.endswith('.css'):
        media_path_prefix = msettings['CSS_PATH']
    elif path.endswith('.js'):
        media_path_prefix = msettings['JS_PATH']
    else:
        # This isn't a CSS/JS file, no combo for you.
        return None

    if media_path_prefix:
        # CS/JSS path prefix has been set. Factor that into the key lookup.
        if not media_path_prefix.endswith('/'):
            # We need to add this slash so we can lop it off the 'path'
            # variable, to match the value in the JOINED dict.
            media_path_prefix += '/'

        if path.startswith(media_path_prefix):
            # Given path starts with the CSS/JS media prefix. Lop this off
            # so we can perform a lookup in the JOINED dict.
            return path[len(media_path_prefix):]
        else:
            # Path is in a root dir, send along as-is.
            return path

    # No CSS/JS path prefix set. Keep it raw.
    return path
535748
function (path, length) {

		var len;

		path = path.split(/[ ,]/);
		len = path.length;

		if (len === 9 || len === 11) {
			path[len - 4] = path[len - 2] = pInt(path[len - 2]) - 10 * length;
		}
		return path.join(' ');
	}
1311925
private int getLength()
    {
        if (m_length_ >= 0) {
            return m_length_;
        }
        int length = m_key_.length;
        for (int index = 0; index < length; index ++) {
            if (m_key_[index] == 0) {
                length = index;
                break;
            }
        }
        m_length_ = length;
        return m_length_;
    }
732788
def file_path(self, request, response=None, info=None):
        
        return json.dumps(self._extract_key_info(request))
186673
function getName(str) {
	var name = path.basename(str);
	if (name.lastIndexOf('.') === -1) {
		name += '.json';
	}
	return name;
}
242009
function findValueByPath(jsonData, path){
    var errorParts = false;
    path.split('.').forEach(function(part){
        if(!errorParts){
            jsonData = jsonData[part];
            if(!jsonData) errorParts = true;
        }
    });
    return errorParts ? 0 : parseFloat(jsonData);
}
514051
def get_file_size(self, path):
        
        id = self._get_id_for_path(path)
        blob = self.repository._repo[id]
        return blob.raw_length()
237298
def full_path_str(self):
        ''''''
        with self._mutex:
            if self._parent:
                if self._parent._name == '/':
                    return self._parent.full_path_str + self._name
                else:
                    return self._parent.full_path_str + '/' + self._name
            else:
                return self._name
1205614
def get_len(self, key):
        """"""
        data = self.model.get_data()
        return len(data[key])
1102877
def path_size(p: tcod.path.AStar) -> int:
    
    return int(lib.TCOD_path_size(p._path_c))