Google Answers Logo
View Question
Q: JSON Output in Ruby on Rails ( No Answer,   0 Comments )
Subject: JSON Output in Ruby on Rails
Category: Computers > Programming
Asked by: ezrabg-ga
List Price: $12.00
Posted: 16 Nov 2006 14:41 PST
Expires: 16 Dec 2006 14:41 PST
Question ID: 783392
I have a simple Ruby on Rails application and need to render output to JSON. 
I have a MySQL database containing a simple directory of site members.
The member fields are:

Profile  	Name  	Email  	City  	State  	Country  	Primary Category

 When I have a new struct and try to render the struct.to_json, I
recieve a pound sign enclosed in quotes.

I've seen a few blogs online that have examples as well as brief
example code from the beta version of the "Agile Development with
Rails 2nd Edition" book, but I can't seem to make it work.

Is there one definitive way of outputting JSON that Ruby\Rails
prefers? I would like an example with some sample code.


Clarification of Question by ezrabg-ga on 16 Nov 2006 15:03 PST
the Profile field should be Profile Url
There is no answer at this time.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy