content in object format
338074
public Object getObject(String type, Package pkg) {
        if (type==null || type.equals(documentType)) {
            if (object==null && content!=null) {
                object = VariableTranslator.realToObject(pkg, documentType, content);
            }
        } else {
            if (content!=null) {
                documentType = type;
                object = VariableTranslator.realToObject(pkg, documentType, content);
            } else if (object!=null) {
                content = VariableTranslator.realToString(pkg, documentType, object);
                documentType = type;
                object = VariableTranslator.realToObject(pkg, documentType, content);
            }
        }
        return object;
    }
95718
function objectAttributeContent( $contentObjectAttribute )
    {
        $contentObjectAttributeID = $contentObjectAttribute->attribute( 'id' );
        $contentObjectAttributeVersion = $contentObjectAttribute->attribute( 'version' );
        $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
        $id = $contentClassAttribute->attribute( 'id' );
        $version = $contentClassAttribute->attribute( 'version' );
        $ismultiple = $contentClassAttribute->attribute( 'data_int1' );
        $isoption = $contentClassAttribute->attribute( 'data_int2' );
        $enum = new eZEnum( $id, $version );
        $enum->setIsmultipleValue( $ismultiple );
        $enum->setIsoptionValue( $isoption );
        $enum->setObjectEnumValue( $contentObjectAttributeID, $contentObjectAttributeVersion );
        return $enum;
    }
335435
function objectToString(object, tabs) {
            var result = [];
            var keys = Object.keys(object);

            keys.forEach(function (key, keyIndex) {
                var line;
                var formatedKey;

                if (-1 < key.indexOf('@')) {
                    formatedKey = '\'' + key + '\'';
                } else {
                    formatedKey = key;
                }

                if (typeof object[key] === 'object') {
                    if (Array.isArray(object[key])) {
                        var newTabs = (tabs + 1);

                        line = getTabs(tabs) + '' + formatedKey + ': [';

                        object[key].forEach(function (item, itemIndex) {
                            if (typeof item === 'object') {
                                line += "\n" + getTabs(newTabs) + '{';
                                line += "\n" + objectToString(item, (newTabs + 1));
                                line += "\n" + getTabs(newTabs) + '}';
                            } else if (typeof item === 'string') {
                                line += "\n" + getTabs(newTabs) + '\'' + addslashes(item) + '\'';
                            } else if (typeof item === 'boolean') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            } else if (typeof item === 'number') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            }

                            if (itemIndex < (object[key].length - 1)) {
                                line += ',';
                            }
                        });

                        line += "\n" + getTabs(tabs) + ']';
                    } else {
                        line = getTabs(tabs) + '' + formatedKey + ': {' + "\n";
                        line += objectToString(object[key], (tabs + 1));
                        line += "\n" + getTabs(tabs) + '}';
                    }
                } else if (typeof object[key] === 'string') {
                    line = getTabs(tabs) + '' + formatedKey + ': \'' + addslashes(object[key]) + '\'';
                } else if (typeof object[key] === 'boolean') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                } else if (typeof object[key] === 'number') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                }

                if (keyIndex < (keys.length - 1)) {
                    line += ',';
                }

                result.push(line);
            });

            return result.join("\n");
        }
1345923
function(obj) {
            if (typeof obj === "object") {
                if (Array.isArray(obj) && obj.length > 1) {
                    obj = '[ '+toString(obj[0])+', ... ]';
                }
            }
            return (obj+'');
        }
614546
def content(self, name, attrs=None, characters=None):
    
    with self.no_inner_space(outer=True):
      with self.element(name, attrs):
        if characters:
          self.characters(characters)
950129
function format(obj, opts, fn) {
  if (typeof opts === 'function') {
    fn = opts; opts = {};
  }

  opts = opts || {};
  if (Array.isArray(opts.filter) || typeof opts.filter === 'string') {
    obj = filter(obj, opts.filter);
  }

  var keys = Object.keys(obj);
  var len = keys.length, i = 0;
  var str = '';
  var total = len;

  while (len--) {
    var fp = keys[i++];
    var ctx = context(read(fp), fn);
    var name = basename(fp);
    str += heading(name, fp);

    var list = obj[fp];
    var methods = Object.keys(list);
    total += methods.length;

    str += listify(fp, methods, ctx);
  }

  var res = {};
  res.list = str;
  res.total = total;
  return res;
}
543299
function readObjectValue(object) {
	let result = ''

	if (typeof object === 'string' || object instanceof String) {
		result = object
	} else if (typeof object === 'number' || object instanceof Number) {
		result = object.toString()
	} else if (object) {
		Object.keys(object).forEach(key => {
			result += key + ': ' + object[key] + '\t'
		})
	}

	if (!result.length) {
		result = 'Not Specified'
	}

	return result.replace(new RegExp('"', 'g'), '""')
}
345285
def format_obj( obj )
    case obj
    when String; obj
    when Exception
      str = "<#{obj.class.name}> #{obj.message}"
      if @backtrace && !obj.backtrace.nil?
        str << "\n\t" << obj.backtrace.join("\n\t")
      end
      str
    when nil; "<#{obj.class.name}> nil"
    else
      str = "<#{obj.class.name}> "
      str << case @obj_format
             when :inspect; obj.inspect
             when :yaml; try_yaml(obj)
             when :json; try_json(obj)
             else obj.to_s end
      str
    end
  end
161096
def content (data)
      string = ''
      data.each_index do |i|
        row = data[i]
        row.each_index do |j|
          column = row[j]
          column ||= {:value => nil, :color => nil}
          width = max_width data, j
          alignment = (@align[j] or @default_align)
          value = Aligner.align alignment, column[:value].to_s, width
          value = Yummi.colorize value, column[:color] unless @no_colors
          string << value
          string << (' ' * @colspan)
        end
        string.strip! << $/
      end
      string
    end
707923
def contents(self):
        """"""
        rslt = []
        for (dpos, dlen, ulen, flag, typcd, nm) in self.toc:
            rslt.append(nm)
        return rslt
872696
def parse_into_object(self, res, text):
        """"""

        text = tounicode(text, encoding="utf-8")

        m = self.start_dict_re.match(text, 0)
        if m:
            i = self._parse_dict_into_object(res, text, 1)
        else:
            self._fail("not correct file format", text, 0)
        if text[i:].strip():
            self._fail("Unexpected trailing content", text, i)
        return i
1337204
function objectToMap ( obj ) {
	const length = Object.keys(obj).length;
	const data = new types.Map(length);
	let i = 0;
	for ( let prop in obj ) {
		if ( obj.hasOwnProperty(prop) ) {
			data.setKey(i, setJsonValueToSassValue(prop));
			data.setValue(i, setJsonValueToSassValue(obj[prop]));
			i++;
		}
	}
	return data;
}
1344764
function format (obj) {
  if (!obj || typeof obj !== 'object') {
    throw new TypeError('argument obj is required')
  }

  var parameters = obj.parameters
  var type = obj.type

  if (!type || !TYPE_REGEXP.test(type)) {
    throw new TypeError('invalid type')
  }

  var string = type

  // append parameters
  if (parameters && typeof parameters === 'object') {
    var param
    var params = Object.keys(parameters).sort()

    for (var i = 0; i < params.length; i++) {
      param = params[i]

      if (!TOKEN_REGEXP.test(param)) {
        throw new TypeError('invalid parameter name')
      }

      string += '; ' + param + '=' + qstring(parameters[param])
    }
  }

  return string
}
45812
function contentObjectByName( $params )
    {
        $objectName = $params['name'];
        $classID = isset( $params['class_id'] ) ? $params['class_id'] : false;

        //build up the conditions
        $conditions = array( 'name' => $objectName );

        if( $classID )
            array_merge( $conditions, array( 'contentclass_id' => $classID ) );

        $objectList = eZContentObject::fetchList( true, $conditions, 0, 1 );

        $object = false;
        if( count( $objectList ) > 0 )
            $object = $objectList[0];

        return $object;
    }
987340
def objset_data(self):
        '''
        '''
        if not self.qualifier:
            return unicode(self.content)
        else:
            return dict(q=unicode(self.qualifier), v=unicode(self.content))
1251777
function objectAttributeContent( $contentObjectAttribute )
    {
        $paexID = $contentObjectAttribute->attribute( "contentobject_id" );
        $paex = eZPaEx::fetch( $paexID );
        return $paex;
    }
1176226
def _format_obj(self, item=None):
        
        # Order here matters, odd behavior with tuples
        if item is None:
            return getattr(self, 'number')(item)
        elif isinstance(item, self.str_):
            #: String
            return item + " "
        elif isinstance(item, bytes):
            #: Bytes
            return getattr(self, 'bytes')(item)
        elif isinstance(item, self.numeric_):
            #: Float, int, etc.
            return getattr(self, 'number')(item)
        elif isinstance(item, self.dict_):
            #: Dict
            return getattr(self, 'dict')(item)
        elif isinstance(item, self.list_):
            #: List
            return getattr(self, 'list')(item)
        elif isinstance(item, tuple):
            #: Tuple
            return getattr(self, 'tuple')(item)
        elif isinstance(item, types.GeneratorType):
            #: Generator
            return getattr(self, 'generator')(item)
        elif isinstance(item, self.set_):
            #: Set
            return getattr(self, 'set')(item)
        elif isinstance(item, deque):
            #: Deque
            return getattr(self, 'deque')(item)
        elif isinstance(item, Sequence):
            #: Sequence
            return getattr(self, 'sequence')(item)
        #: Any other object
        return getattr(self, 'object')(item)