Git Product home page Git Product logo

jsonify's People

Contributors

andriusch avatar bsiggelkow avatar elskwid avatar karlfreeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsonify's Issues

how about removing the result wrapper from the first example in the README?

I think most people who will be interested in this library will want to use it for REST rather than RPC. Also the first example doesn't show how to have more than one item in the root object. If it showed how to have more than one item in the root object people could probably figure out how to have only one item in the root object, but it doesn't go the other way.

Invalid date format in the gemspec

I'm getting this error:

Invalid gemspec in [/Users/rafamvc/Developer/.rvm/gems/ruby-1.9.2-p136@railspre/specifications/jsonify-0.1.2.gemspec]: invalid date format in specification: "2011-08-09 00:00:00.000000000Z"
Invalid gemspec in [/Users/rafamvc/Developer/.rvm/gems/ruby-1.9.2-p136@railspre/specifications/jsonify-rails-0.0.7.gemspec]: invalid date format in specification: "2011-08-05 00:00:00.000000000Z"
Invalid gemspec in [/Users/rafamvc/Developer/.rvm/gems/ruby-1.9.2-p136@railspre/specifications/jsonify-0.1.2.gemspec]: invalid date format in specification: "2011-08-09 00:00:00.000000000Z"
Invalid gemspec in [/Users/rafamvc/Developer/.rvm/gems/ruby-1.9.2-p136@railspre/specifications/jsonify-rails-0.0.7.gemspec]: invalid date format in specification: "2011-08-05 00:00:00.000000000Z"

Strings in arrays

I'm some problems using strings is arrays.

For example this:

json.test ['hello world']

Produces:

{
"test": ["helloworld"}
}

It strips out the whitespace characters.

Cant start application after installing jsonify Ruby 1.9.2p180 rails 3

Hello,
I cant start rails application after installing Jsonify to my gemfile:

โžœ caza git:(214-uko) โœ— rails server
script/rails:6: stack level too deep (SystemStackError)

I tried out about 4 tools to creating json, this look like that I wanted but I cant run it. I would be very pleased and very happy for any help :).

Best regards.

Comments are still being processed

Somehow, when I run the code with comments it breaks, if I delete the comments it works:

# [{"description":"test description","title":"test rafa","icon_url":"http://localhost:3000/uploads/asset_library/logo_asset/3/resized_target-logo.png","content_url":"http://localhost:3000/creatives/8/ad"}]
@links = [
  ['self',   'http://example.com/people/123'],
  ['school', 'http://gatech.edu'],
]
json.links(@links) do |link|
  {:rel => link.first, :href => link.last}
end

# json.rafa "rafa"
# json.append! @creatives.count
# json.creative(@creatives) do |creative|
#   {:description => creative.description, :title => creative.title, :iconUrl => creative.icon_url, :contentUrl => creative.content_url}
# end

# ["test",{"creative":{"description":"test rafa latest","title":"test rafa latest"}}]

Please add .travis.yml for travis-ci.org

Hi,

Your travis-ci.org builds are failing because you did not configure what Rubies you want to test against, and your code has 1.9-specific hashes. Please add .travis.yml because Travis uses 1.8.7 by default. You can use amqp gem as example.

Thank you.

on behalf of the Travis CI Team

There's no way to create a bare array of json objects

At least as far as I can tell. You can create an array of strings easily (as per the API docs) but what I'd like to be able to do is (something like):

json.array!(things) do |thing|
  json.foo thing.bar
  json.other_foo thing.item
end

to return

[{'foo':'bar', 'other_foo':1}, {'foo':'baz', 'other_foo':2},...]

allow Builder.new to take a block

I think it would be neat if instead of

json = Builder.new Jsonify::Builder.new(:pretty => true)
json.owner = 'bsiggelkow'
json.repo = 'jsonify'
body = json.compile!

I could do

json = Builder.new Jsonify::Builder.new(:pretty => true) do |json|
  json.owner = 'bsiggelkow'
  json.repo = 'jsonify'
end.compile!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.