Module: DataMapper::Serialize

Module | DataMapper::Serialize
In: | lib/dm-serializer/common.rb lib/dm-serializer/to_csv.rb lib/dm-serializer/to_json.rb lib/dm-serializer/to_xml.rb lib/dm-serializer/to_yaml.rb lib/dm-serializer/xml_serializers.rb lib/dm-serializer/xml_serializers/libxml.rb lib/dm-serializer/xml_serializers/nokogiri.rb lib/dm-serializer/xml_serializers/rexml.rb

### Methods

properties_to_serialize to_csv to_json to_xml to_xml_document to_yaml

### Classes and Modules

Module DataMapper::Serialize::XMLSerializers

### Public Instance methods

properties_to_serialize(options)

Returns propreties to serialize based on :only or :exclude arrays, if provided :only takes precendence over :exclude

@return <Array> properties that need to be serialized

to_csv(writer = '')

Serialize a Resource to comma-separated values (CSV).

@return <String> a CSV representation of the Resource

to_json(*args)

Serialize a Resource to JavaScript Object Notation (JSON; RFC 4627)

@return <String> a JSON representation of the Resource

to_xml(opts = {})

Serialize a Resource to XML

@return <REXML::Document> an XML representation of this Resource

to_yaml(opts_or_emitter = {})

Serialize a Resource to YAML

@return <YAML> a YAML representation of this Resource

### Protected Instance methods

to_xml_document(opts={}, doc = nil)

This method requires certain methods to be implemented in the individual serializer library subclasses: new_document root_node add_property_node add_node

[Validate]