Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created November 30, 2011 20:12
Show Gist options
  • Save tenderlove/1410608 to your computer and use it in GitHub Desktop.
Save tenderlove/1410608 to your computer and use it in GitHub Desktop.
###
# This is a JSON building library. It allows you to build data structures
# to dump as JSON. Here is a sample of how to use it:
#
# def person_hash(person)
# {
# 'name' => person.name,
# 'age' => person.age,
# 'friends' => person.friends.map { |x| person_hash x }
# }
# end
#
# JSON.dump person_hash Person.find 1
@Spaceghost
Copy link

I don't know, I really wish we could get something simpler, like Wycat's MVC JS framework. This one has too much untested code too. -1

@odedharth
Copy link

looks great, this should definitely be in Rails 3.2

@foca
Copy link

foca commented Nov 30, 2011

Yeah, @tenderlove, Y U NO ADD TESTS? :'(

@ralph
Copy link

ralph commented Nov 30, 2011

NAILED IT!!! <3 Solved once and forever, for every use case!!! <3 <3 <3 <3 <3

@kblake
Copy link

kblake commented Nov 30, 2011

hawt!

@joevandyk
Copy link

As a leader in the ruby community, @tenderlove should be setting a good example by providing only well-tested code.

@mikekelly
Copy link

bwaha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment