# Releases

# v1.0.0

What's new:

Example: JSON XML

What's changed:

# v0.9.0

What's new:

# you can also pass string to encoding e.g. encoding: 'ASCII' person.to_xml(pretty: true, declaration: '1.1', encoding: true) # => # # <?xml version="1.1" encoding="UTF-8"?> # <Person> # <Address city="London"/> # </Person>

# v0.8.0

What's new:

What's changed:

# v0.7.1

What's changed:

# v0.7.0

What's new:

What's changed:

# so this: person.to_json(:pretty) # changes into this: person.to_json(pretty: true)
class Person < Shale::Mapper attribute :first_name, Shale::Type::String json do map 'first_name', using: { from: :first_name_from, to: first_name_to } end def first_name_from(model, value) model.first_name = value end def first_name_to(model, doc) doc['first_name'] = model.first_name end end

# v0.6.0

What's new:

What's changed:

# v0.5.0

What's new:

What's changed:

require 'shale/adapter/rexml' Shale.xml_adapter = Shale::Adapter::REXML