Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Convert output to JSON
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Simone Carletti  
View profile  
 More options Jun 20 2011, 6:18 am
From: Simone Carletti <wep...@weppos.net>
Date: Mon, 20 Jun 2011 12:18:19 +0200
Local: Mon, Jun 20 2011 6:18 am
Subject: Re: Convert output to JSON

By default, the library do not provide a JSON conversion logic.
You have to create it.

If you include the JSON library, you can call #to_json on the response but
you might want to adjust the result since the default behavior of
Object#to_json is to serialize all the instance variables of the object.

-- Simone

On Thu, Jun 16, 2011 at 8:24 AM, Joyce Babu <jo...@joycebabu.com> wrote:
> Hello,

> I am new to Ruby programming. Is it possible to convert the
> Whois::Record object to JSON format?

> I tried

>      c = Whois::Client.new
>      r = c.query(n)
>      content_type :json
>      "#{r.to_json}"

> But it didn't work.

--
Simone Carletti
Application Developer

Site & Blog: http://www.simonecarletti.com
Email: wep...@weppos.net
LinkedIn: http://linkedin.com/in/weppos
Skype: weppos


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.