0.0
No commit activity in last 3 years
No release in over 3 years
Builder::XmlMarkup like JsonBuilder
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme
= jsonbuilder

  by nov http://github.com/nov <nov@cerego.com> and
     birkirb http://github.com/birkirb

== Description

== Installation

  git clone http://github.com/nov/jsonbuilder.git
  cd jsonbuilder
  rake install

=== Archive Installation

  rake install

=== Gem Installation

  gem install jsonbuilder --source http://gems.rubyforge.org

     OR for the lastest development version

  gem install nov-jsonbuilder --source http://gems.github.com

== Features/Problems

  The Hash builder will return a hash structured in a similar way as the corresponding xml
  built by XmlMarkup. The Json builder will return the same kind of hash as a JSON string

  USAGE:
  def serialize(builder, options = {})
    builder.user(
      :id => id,
      :url => url
    )
    builder.array_mode do
      builder.images do
        package.images.each do |image|
          builder << image.builder(builder.class.new, :only_url => true)
        end
      end
    end
    builder.target!
  end

  def to_xml(options = {})
    self.serialize(Builder::XMmlMarkup.new, options)
  end

  def to_hash(options = {})
    self.serialize(Builder::HashStructure.new, options)
  end

  def to_json(options = {})
    self.serialize(Builder::JsonFormat.new, options)
  end

== Synopsis

== Copyright

Author::    nov <nov@matake.jp> and birkirb
Copyright:: Copyright (c) 2009 nov
License::   MIT License