if you want to convert some string to an object, you have an argument to parse
354119
public ConfigOptionBuilder setStringConverter( StringConverter converter ) {
        co.setConverter( converter );
        co.setHasArgument( true );
        return this;
    }
1056140
def parse_arg(arg):
    
    # handle string input
    if type(arg) == str:
        arg = arg.strip()
        # parse csv as tickers and create children
        if ',' in arg:
            arg = arg.split(',')
            arg = [x.strip() for x in arg]
        # assume single string - create single item list
        else:
            arg = [arg]

    return arg
1340066
function parseString(str) {
    var obj = {};
    var pairs = str.split('&');
    var parts;
    var pair;

    for (var i = 0, len = pairs.length; i < len; ++i) {
        pair = pairs[i];
        parts = pair.split('=');
        obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);
    }

    return obj;
}
513424
function parse(str) {
  var obj = {};
  var pairs = str.split(/ *; */);
  var pair;
  if ('' == pairs[0]) return obj;
  for (var i = 0; i < pairs.length; ++i) {
    pair = pairs[i].split('=');
    obj[decode(pair[0])] = decode(pair[1]);
  }
  return obj;
}
1157673
function _parse(type, obj, options)
{
    if (!obj) return _checkResult(type, lib.newError("empty " + type), obj, options);
    try {
        obj = _parseResult(type, obj, options);
    } catch(err) {
        obj = _checkResult(type, err, obj, options);
    }
    return obj;
}
775726
function parseArguments$3(args) {
        var first = args[0];
        var second = args[1];

        return typeof first === 'string' ? { namespace: first, mappings: second } : { namespace: null, mappings: first };
    }
6694
def raw= (args)
      @original = args
      case args
      when String
        parse_from_string(args)
      when Hash
        args = { :area_code => PhoneNumber.default_area_code }.merge(args)
        NUMBER_PARTS.each do |key|
          send("#{key}=", args[key]) if args[key]
        end
      when Array
        self.pack!(args)
      else
        raise ArgumentError.new("Sorry, can't handle arguments of type #{args.class}")
      end
    end
1349242
function argsToObject(args) {
  var options = {};
  options.address = args.shift();
  options.output = args.shift();

  // Pair two arguments, while transforming the key to camelCase
  for (i = 0; i < args.length; i = i + 2) {
    options[toCamelCase(args[i].substr(2))] = args[i + 1];
  }

  return options;
}
528623
def _parse(cls, scope):
    
    if not scope:
      return ('default',)
    if isinstance(scope, string_types):
      scope = scope.split(' ')
    scope = {str(s).lower() for s in scope if s}
    return scope or ('default',)
1286307
def parse_input(args, kwargs=None, condition=True, no_parse=None):
    '''
    
    '''
    if no_parse is None:
        no_parse = ()
    if kwargs is None:
        kwargs = {}
    _args = []
    _kwargs = {}
    for arg in args:
        if isinstance(arg, six.string_types):
            arg_name, arg_value = parse_kwarg(arg)
            if arg_name:
                _kwargs[arg_name] = yamlify_arg(arg_value) \
                    if arg_name not in no_parse \
                    else arg_value
            else:
                _args.append(yamlify_arg(arg))
        elif isinstance(arg, dict):
            # Yes, we're popping this key off and adding it back if
            # condition_input is called below, but this is the only way to
            # gracefully handle both CLI and API input.
            if arg.pop('__kwarg__', False) is True:
                _kwargs.update(arg)
            else:
                _args.append(arg)
        else:
            _args.append(arg)
    _kwargs.update(kwargs)
    if condition:
        return condition_input(_args, _kwargs)
    return _args, _kwargs
1016499
def parse_args(string):
    
    import ast
    is_quoted = False
    result_parts = []
    current_str = ""
    while len(string) > 0:
        if string[0] == "\"":
            is_quoted = not is_quoted
            current_str += string[0]
        elif string[0].isspace():
            if is_quoted:
                current_str += string[0]
            else:
                result_parts.append(current_str)
                current_str = ""
            # end if
        else:
            current_str += string[0]
        # end if
        string = string[1:]
    # end while
    if current_str:  # last part of the array
        result_parts.append(current_str)
    # end if
    for i in range(len(result_parts)):
        # Will try for each element if it is something pythonic. Parsed type will replace original list element.
        try:
            part = ast.literal_eval(result_parts[i])
            result_parts[i] = part  # write it back.
        except ValueError:
            # could not parse -> is string
            pass  # because already is str.
        # end try
    # end for
    return result_parts
1208335
def arg_string_from_dict(arg_dict, **kwds):
    
    # the filters dictionary
    filters = {
        **arg_dict,
        **kwds,
    }
    # return the correctly formed string
    return ", ".join("{}: {}".format(key, json.dumps(value)) for key,value in filters.items())
280705
function parse(string) {
    let result = string;

    // Check if string contains 'function' and start with it to eval it
    if (result.indexOf('function') === 0) {
        return eval(`(${result})`); // eslint-disable-line no-eval
    }

    try {
        result = JSON.parse(string);
    } catch (e) {
        // Error
    }
    return result;
}
281813
function parseString(str, options){
  var ret = reduce(String(str).split(options.separator), function(ret, pair){
    var eql = indexOf(pair, '=')
      , brace = lastBraceInKey(pair)
      , key = pair.substr(0, brace || eql)
      , val = pair.substr(brace || eql, pair.length)
      , val = val.substr(indexOf(val, '=') + 1, val.length);

    // ?foo
    if ('' == key) key = pair, val = '';
    if ('' == key) return ret;

    return merge(ret, decode(key), decode(val));
  }, { base: {} }).base;

  return compact(ret);
}
639420
function parse(str, opts) {
  var parser = new Parser(str, opts);
  return {attrs: parser._readProtocol(), imports: parser._imports};
}
1131765
private Object convertStringToObject(String string)
    	throws ClassNotFoundException
    {
        if ((string == null) || (string.length() == 0))
            return null;
        try {
            InputStream reader = new ByteArrayInputStream(string.getBytes(BundleConstants.OBJECT_ENCODING));//Constants.STRING_ENCODING));
            ObjectInputStream inStream = new ObjectInputStream(reader);
            Object obj = inStream.readObject();
            reader.close();
            inStream.close();
            return obj;
        } catch (IOException ex)    {
            ex.printStackTrace();   // Never
        }
        return null;
    }
438877
def _parse_object(value):
    
    value = value.lstrip()
    if not value or value[0] not in _brace_strings:
        return None
    return json.loads(value)