Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement suggestion #2

Open
franciscomxs opened this issue May 11, 2015 · 2 comments
Open

Improvement suggestion #2

franciscomxs opened this issue May 11, 2015 · 2 comments

Comments

@franciscomxs
Copy link

def initialize(json)
  # read your JSON response here for example:
    for i in 0..(json.length-1)
    object = json.get(i)
    # Your code here
  end
end

What about change the json interface, maybe parsing it to a Ruby hash, to be easier to use?

def initialize(json)
  json.map do |object| #today you can't map this json.
    object # { attr1: 'Value', attr2: 'Value' }
  end
end
@TigerWolf
Copy link
Owner

Thanks for the suggestion. I would like to do something like this. Would you like to submit some code as a pull request?

@h1u2i3
Copy link

h1u2i3 commented Jul 24, 2015

If you want to parse jsonObject to a Ruby hash, check https://github.com/darinwilson/moran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants