json_builder 3.0.7 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  pkg/*
2
+ doc/*
2
3
  .DS_Store
3
- *.log
4
+ *.log
5
+ /.rbenv-version
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - jruby
7
+ - jruby-18mode
8
+ - jruby-19mode
9
+ - jruby-head
data/Gemfile CHANGED
@@ -1,9 +1,10 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
5
  gem 'rake'
6
6
 
7
7
  group :test do
8
- gem 'i18n'
9
- end
8
+ gem 'i18n'
9
+ gem 'tzinfo'
10
+ end
data/Gemfile.lock CHANGED
@@ -1,17 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- json_builder (3.0.7)
4
+ json_builder (3.1.0)
5
5
  activesupport (>= 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activesupport (3.1.3)
10
+ activesupport (3.2.1)
11
+ i18n (~> 0.6)
11
12
  multi_json (~> 1.0)
12
- i18n (0.5.0)
13
- multi_json (1.0.4)
13
+ i18n (0.6.0)
14
+ multi_json (1.1.0)
14
15
  rake (0.9.2.2)
16
+ tzinfo (0.3.31)
15
17
 
16
18
  PLATFORMS
17
19
  ruby
@@ -20,3 +22,4 @@ DEPENDENCIES
20
22
  i18n
21
23
  json_builder!
22
24
  rake
25
+ tzinfo
data/README.md CHANGED
@@ -8,24 +8,24 @@ Rails provides an excellent XML Builder by default to build RSS and ATOM feeds,
8
8
  require 'json_builder'
9
9
 
10
10
  json = JSONBuilder::Compiler.generate do
11
- name "Garrett Bjerkhoel"
12
- email "spam@garrettbjerkhoel.com"
11
+ name 'Garrett Bjerkhoel'
12
+ email 'spam@garrettbjerkhoel.com'
13
13
  url root_path
14
14
  address do
15
- street "1234 1st Ave"
16
- street2 "Apt 1"
17
- city "New York"
18
- state "NY"
15
+ street '1234 1st Ave'
16
+ street2 'Apt 1'
17
+ city 'New York'
18
+ state 'NY'
19
19
  zip 10065
20
20
  end
21
- key :nil, "testing a custom key name"
21
+ key :nil, 'testing a custom key name'
22
22
  skills do
23
23
  ruby true
24
24
  asp false
25
25
  end
26
26
  longstring do
27
27
  # Could be a highly intensive process that only returns a string
28
- "12345" * 25
28
+ '12345' * 25
29
29
  end
30
30
  end
31
31
  ```
@@ -56,7 +56,7 @@ Which will generate:
56
56
  If you'd like to just generate an array:
57
57
 
58
58
  ```ruby
59
- array ["Garrett Bjerkhoel", "John Doe"] do |name|
59
+ array ['Garrett Bjerkhoel', 'John Doe'] do |name|
60
60
  first, last = name.split(' ')
61
61
  first first
62
62
  last last
@@ -100,13 +100,13 @@ class UsersController < ApplicationController
100
100
  end
101
101
  ```
102
102
 
103
- Lastly, create `app/views/users/index.json_builder` which could look something like:
103
+ Lastly, create `app/views/users/index.json.json_builder` which could look something like:
104
104
 
105
105
  ```ruby
106
106
  count @users.count
107
- current_page @users.current_page
107
+ page @users.current_page
108
108
  per_page @users.per_page
109
- num_pages @users.num_pages
109
+ pages_count @users.num_pages
110
110
  results @users do |user|
111
111
  id user.id
112
112
  name user.name
@@ -124,10 +124,10 @@ You will get something like:
124
124
 
125
125
  ```json
126
126
  {
127
- "total": 10,
127
+ "count": 10,
128
128
  "page": 1,
129
129
  "per_page": 2,
130
- "total_pages": 5,
130
+ "pages_count": 5,
131
131
  "results": [
132
132
  {
133
133
  "id": 1,
@@ -170,7 +170,7 @@ You will get something like:
170
170
 
171
171
  ### Including JSONP callbacks
172
172
 
173
- Out of the box JSON Builder supports JSONP callbacks when used within a Rails project just by using the callback parameter. For instance, if you requested `/users.json?callback=myjscallback`, you'll get a callback wrapping the response:
173
+ Out of the box JSON Builder supports JSONP callbacks when used within a Rails project just by using the `callback` parameter. For instance, if you requested `/users.json?callback=myjscallback`, you'll get a callback wrapping the response:
174
174
 
175
175
  ```json
176
176
  myjscallback([
@@ -183,25 +183,26 @@ myjscallback([
183
183
  ])
184
184
  ```
185
185
 
186
- To be able to turn off this functionality, you can do it per-environment, or globally:
186
+ To turn off JSONP callbacks globally or just per-environment:
187
187
 
188
- #### Per Environment
188
+
189
+ #### Globally
189
190
 
190
191
  ```ruby
191
- Spyder::Application.configure do
192
- config.action_view.json_callback = false
193
- end
192
+ ActionView::Base.json_callback = false
194
193
  ```
195
194
 
196
- #### Globally
195
+ #### Per Environment
197
196
 
198
197
  ```ruby
199
- ActionView::Base.json_callback = false
198
+ Sample::Application.configure do
199
+ config.action_view.json_callback = false
200
+ end
200
201
  ```
201
202
 
202
203
  ### Pretty Print Output
203
204
 
204
- Out of the box JSON Builder supports pretty printing the JSON for the development environment, the rest have it turned off for performance reasons. If you'd like to enable or disable pretty printing you can do it within your environment file or you can do it globally.
205
+ Out of the box JSON Builder supports pretty printing only during development, it's disabled by default in other environments for performance. If you'd like to enable or disable pretty printing you can do it within your environment file or you can do it globally.
205
206
 
206
207
  With pretty print on:
207
208
 
@@ -221,7 +222,7 @@ Without:
221
222
  #### Per Environment
222
223
 
223
224
  ```ruby
224
- Spyder::Application.configure do
225
+ Sample::Application.configure do
225
226
  config.action_view.pretty_print_json = false
226
227
  end
227
228
  ```
@@ -239,9 +240,9 @@ JSON Builder is very fast, it's roughly 3.6 times faster than the core XML Build
239
240
  JSONBuilder 2.950000 0.010000 2.960000 (2.968790)
240
241
  Builder 10.820000 0.040000 10.860000 (10.930497)
241
242
 
242
- ## Other JSON Builders
243
+ ## Alternative libraries
243
244
 
244
- There are quite a few other alternatives to JSON Builder, each good in their own way with different DSL's and design approaches that are worth checking out:
245
+ There are alternatives to JSON Builder, each good in their own way with different API's and design approaches that are worth checking out. Although, I would love to hear why JSON Builder didn't fit your needs, by [message or issue.
245
246
 
246
247
  * [jbuilder](https://github.com/rails/jbuilder)
247
248
  * [RABL](https://github.com/nesquena/rabl)
data/Rakefile CHANGED
@@ -17,4 +17,4 @@ Rake::TestTask.new(:test) do |t|
17
17
  t.libs << 'test'
18
18
  t.test_files = FileList['test/*_test.rb']
19
19
  t.verbose = true
20
- end
20
+ end
data/json_builder.gemspec CHANGED
@@ -16,4 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ['lib']
17
17
 
18
18
  s.add_dependency 'activesupport', '>= 2.0.0'
19
+ s.add_development_dependency 'tzinfo'
19
20
  end
data/lib/json_builder.rb CHANGED
@@ -5,4 +5,4 @@ require 'json_builder/template' if defined? Rails
5
5
  module JSONBuilder
6
6
  class InvalidArgument < StandardError; end
7
7
  class MissingKeyError < StandardError; end
8
- end
8
+ end
@@ -2,25 +2,25 @@ require 'active_support/all'
2
2
 
3
3
  class FalseClass
4
4
  def to_builder
5
- self.inspect
5
+ 'false'
6
6
  end
7
7
  end
8
8
 
9
9
  class TrueClass
10
10
  def to_builder
11
- self.inspect
11
+ 'true'
12
12
  end
13
13
  end
14
14
 
15
15
  class String
16
16
  def to_builder
17
- self.inspect
17
+ "\"#{self}\""
18
18
  end
19
19
  end
20
20
 
21
21
  class Hash
22
22
  def to_builder
23
- self.to_json
23
+ to_json
24
24
  end
25
25
  end
26
26
 
@@ -30,28 +30,36 @@ class NilClass
30
30
  end
31
31
  end
32
32
 
33
+ module ActiveSupport
34
+ class TimeWithZone
35
+ def to_builder
36
+ "\"#{iso8601}\""
37
+ end
38
+ end
39
+ end
40
+
33
41
  class Time
34
42
  def to_builder
35
- iso8601.inspect
43
+ "\"#{iso8601}\""
36
44
  end
37
45
  end
38
46
 
39
47
  class Date
40
48
  def to_builder
41
- to_time.iso8601.inspect
49
+ "\"#{to_time.iso8601}\""
42
50
  end
43
51
  end
44
52
 
45
53
  class DateTime
46
54
  def to_builder
47
- to_time.iso8601.inspect
55
+ "\"#{to_time.iso8601}\""
48
56
  end
49
57
  end
50
58
 
51
59
  module BSON
52
60
  class ObjectId
53
61
  def to_builder
54
- self.to_s.inspect
62
+ "\"#{self}\""
55
63
  end
56
64
  end
57
65
  end
@@ -47,7 +47,7 @@ if defined?(Rails) && Rails.version =~ /^3/
47
47
 
48
48
  %{
49
49
  ::JSONBuilder::Compiler.generate(:scope => self, :pretty => ActionView::Base.pretty_print_json, :callback => ActionView::Base.json_callback) {
50
- #{template.source}
50
+ #{source}
51
51
  }
52
52
  }
53
53
  end
@@ -1,3 +1,3 @@
1
1
  module JSONBuilder
2
- VERSION = '3.0.7'
2
+ VERSION = '3.1.0'
3
3
  end
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'test_helper'
2
4
  require 'active_support/ordered_hash'
3
5
 
@@ -11,7 +13,7 @@ class TestCompiler < Test::Unit::TestCase
11
13
  def valid?
12
14
  true
13
15
  end
14
-
16
+
15
17
  name 'Garrett Bjerkhoel'
16
18
  valid valid?
17
19
  end
@@ -22,11 +24,13 @@ class TestCompiler < Test::Unit::TestCase
22
24
  date Date.new(2011, 11, 23)
23
25
  date_time DateTime.new(2001, 2, 3, 4, 5, 6)
24
26
  timed Time.utc(2012)
27
+ Time.zone = "CET"
28
+ zoned Time.zone.local(2012)
25
29
  end
26
30
  # The date will have the local time zone offset, hence the wildcard.
27
- assert_match(%r{\{"date": "2011-11-23T00:00:00.*", "date_time": "2001-02-03T04:05:06Z", "timed": "2012-01-01T00:00:00Z"\}}, actual)
31
+ assert_match(%r{\{"date": "2011-11-23T00:00:00.*", "date_time": "2001-02-03T04:05:06Z", "timed": "2012-01-01T00:00:00Z", "zoned": "2012-01-01T00:00:00\+01:00"\}}, actual)
28
32
  end
29
-
33
+
30
34
  def test_should_support_all_datatypes
31
35
  assert_builder_json('{"integer": 1, "mega_integer": 100000000, "float": 13.37, "true_class": true, "false_class": false, "missing_nil": null}') do
32
36
  integer 1
@@ -37,7 +41,7 @@ class TestCompiler < Test::Unit::TestCase
37
41
  missing_nil
38
42
  end
39
43
  end
40
-
44
+
41
45
  def test_should_support_multiple_nestings
42
46
  assert_builder_json('{"u": [{"id": 1, "l": [{"l": 1, "d": "t"}, {"l": 2, "d": "tt"}]}, {"id": 2, "l": [{"l": 2, "d": "t"}, {"l": 4, "d": "tt"}]}]}') do
43
47
  u [1, 2] do |i|
@@ -51,13 +55,13 @@ class TestCompiler < Test::Unit::TestCase
51
55
  end
52
56
  end
53
57
  end
54
-
58
+
55
59
  def test_support_custom_key_names
56
60
  assert_builder_json('{"custom_key": 1, "with_method": "nope", "as_string": true, "nested": {"deep_down": -1, "custom": true}, "nope": "chuck"}') do
57
61
  def with_method
58
62
  "nope"
59
63
  end
60
-
64
+
61
65
  key :custom_key, 1
62
66
  key :with_method, with_method
63
67
  key 'as_string', true
@@ -65,14 +69,14 @@ class TestCompiler < Test::Unit::TestCase
65
69
  def custom
66
70
  'custom'
67
71
  end
68
-
72
+
69
73
  key 'deep_down', -1
70
74
  key custom, true
71
75
  end
72
76
  key with_method, 'chuck'
73
77
  end
74
78
  end
75
-
79
+
76
80
  def test_support_custom_classes
77
81
  assert_builder_json('{"hello": "olleh"}') do
78
82
  hello Dozer.new('hello')
@@ -84,4 +88,10 @@ class TestCompiler < Test::Unit::TestCase
84
88
  hash_test :garrett => true
85
89
  end
86
90
  end
91
+
92
+ def test_adding_unicoded_key
93
+ assert_builder_json('{"é": "json"}') do
94
+ key 'é', 'json'
95
+ end
96
+ end
87
97
  end
@@ -4,18 +4,18 @@ class TestElements < Test::Unit::TestCase
4
4
  def assert_elements_equal(value, array)
5
5
  assert_equal value, JSONBuilder::Elements.new(nil, array).to_s
6
6
  end
7
-
7
+
8
8
  def test_array_hash
9
9
  assert_elements_equal '[{"woot":true}]', [{ :woot => true }]
10
10
  end
11
-
11
+
12
12
  def test_custom_class_objects
13
13
  assert_elements_equal '["olleh", "eybdoog"]', [Dozer.new('hello'), Dozer.new('goodbye')]
14
14
  end
15
-
15
+
16
16
  def test_raises_invalid_argument
17
17
  assert_raises(JSONBuilder::InvalidArgument) {
18
18
  JSONBuilder::Elements.new(nil, false).to_s
19
19
  }
20
20
  end
21
- end
21
+ end
@@ -4,44 +4,48 @@ class TestExtensions < Test::Unit::TestCase
4
4
  def test_string_respond_to
5
5
  assert_respond_to 'json_builder', :to_builder
6
6
  end
7
-
7
+
8
8
  def test_ordered_hash
9
9
  assert_respond_to ActiveSupport::OrderedHash.new(:json_builder => true), :to_builder
10
10
  end
11
-
11
+
12
12
  def test_true_value
13
13
  assert_respond_to true, :to_builder
14
14
  end
15
-
15
+
16
16
  def test_false_value
17
17
  assert_respond_to false, :to_builder
18
18
  end
19
-
19
+
20
20
  def test_hash_value
21
21
  assert_respond_to({ :json_builder => true }, :to_builder)
22
22
  end
23
-
23
+
24
24
  def test_nil_value
25
25
  assert_respond_to nil, :to_builder
26
26
  end
27
-
27
+
28
+ def test_time_with_zone_value
29
+ assert_respond_to Time.zone.now, :to_builder
30
+ end
31
+
28
32
  def test_time_value
29
33
  assert_respond_to Time.utc(2012), :to_builder
30
34
  end
31
-
35
+
32
36
  def test_date_value
33
37
  assert_respond_to Date.parse('2012-01-01'), :to_builder
34
38
  end
35
-
39
+
36
40
  def test_datetime_value
37
41
  assert_respond_to DateTime.parse('2012-01-01'), :to_builder
38
42
  end
39
-
43
+
40
44
  def test_bson_objectid_value
41
45
  assert_respond_to BSON::ObjectId.new, :to_builder
42
46
  end
43
-
47
+
44
48
  def test_custom_class
45
49
  assert_respond_to Dozer.new('hello'), :to_builder
46
50
  end
47
- end
51
+ end
data/test/member_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  class TestMember < Test::Unit::TestCase
@@ -8,31 +10,35 @@ class TestMember < Test::Unit::TestCase
8
10
  def test_is_a_builder_value
9
11
  assert_equal JSONBuilder::Member, member(:hello, true).class
10
12
  end
11
-
13
+
12
14
  def test_key_as_symbol
13
15
  assert_equal '"hello": true', member(:hello, true).to_s
14
16
  end
15
-
17
+
18
+ def test_key_as_unicoded_symbol
19
+ assert_equal '"hellyé": true', member('hellyé', true).to_s
20
+ end
21
+
16
22
  def test_key_as_string
17
23
  assert_equal '"hello": true', member('hello', true).to_s
18
24
  end
19
-
25
+
20
26
  def test_value_as_array
21
27
  assert_equal '"hello": [{"ruby":true}]', member('hello', [{ :ruby => true }]).to_s
22
28
  end
23
-
29
+
24
30
  def test_value_as_block
25
- assert_equal '"hello": "hi"', member('hello') { "hi" }.to_s
31
+ assert_equal '"hello": "hi"', member('hello') { 'hi' }.to_s
26
32
  end
27
-
33
+
28
34
  def test_value_as_block_with_hash
29
35
  assert_equal '"hello": {"ruby":true}', member('hello') { { :ruby => true } }.to_s
30
36
  end
31
-
37
+
32
38
  def test_custom_class
33
39
  assert_equal '"hello": "olleh"', member('hello', Dozer.new('hello')).to_s
34
40
  end
35
-
41
+
36
42
  def test_without_key
37
43
  assert_raises(JSONBuilder::MissingKeyError) { member(nil, true).to_s }
38
44
  end
data/test/test_helper.rb CHANGED
@@ -8,14 +8,15 @@ $LOAD_PATH.unshift dir + '/../lib'
8
8
  $TESTING = true
9
9
  require 'test/unit'
10
10
  require 'json_builder'
11
+ require 'tzinfo'
11
12
 
12
13
  class Dozer
13
14
  attr_accessor :value
14
-
15
+
15
16
  def initialize(value)
16
17
  @value = value
17
18
  end
18
-
19
+
19
20
  def to_builder
20
21
  @value.reverse.inspect
21
22
  end
data/test/value_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  class TestValue < Test::Unit::TestCase
@@ -5,10 +7,6 @@ class TestValue < Test::Unit::TestCase
5
7
  JSONBuilder::Value.new(nil, value).to_s
6
8
  end
7
9
 
8
- def test_is_a_builder_value
9
- assert_equal JSONBuilder::Value, JSONBuilder::Value.new(nil, true).class
10
- end
11
-
12
10
  def test_positive_value
13
11
  assert_equal '1', value(1)
14
12
  end
@@ -37,12 +35,21 @@ class TestValue < Test::Unit::TestCase
37
35
  assert_equal 'test', value(:test)
38
36
  end
39
37
 
38
+ def test_unicode_char_value
39
+ assert_equal '"hellyé"', value('hellyé')
40
+ end
41
+
40
42
  def test_time_value
41
43
  assert_equal '"2012-01-01T00:00:00Z"', value(Time.utc(2012))
42
44
  end
43
45
 
46
+ def test_time_with_zone_value
47
+ Time.zone = 'CET'
48
+ assert_equal '"2012-01-01T00:00:00+01:00"', value(Time.zone.local(2012))
49
+ end
50
+
51
+ # This will be the local time zone offset, hence the wildcard.
44
52
  def test_date_value
45
- # This will be the local time zone offset, hence the wildcard.
46
53
  assert_match /"2012-01-01T00:00:00.*/, value(Date.parse('2012-01-01'))
47
54
  end
48
55
 
metadata CHANGED
@@ -1,38 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: json_builder
3
- version: !ruby/object:Gem::Version
4
- version: 3.0.7
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 3
7
+ - 1
8
+ - 0
9
+ version: 3.1.0
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Garrett Bjerkhoel
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-02-08 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-02-27 00:00:00 -08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: activesupport
16
- requirement: &70277572004620 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
17
23
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
30
+ - 0
21
31
  version: 2.0.0
22
32
  type: :runtime
23
33
  prerelease: false
24
- version_requirements: *70277572004620
25
- description: Rails provides an excellent XML Builder by default to build RSS and ATOM
26
- feeds, but nothing to help you build complex and custom JSON data structures. The
27
- standard to_json works well, but can get very verbose when you need full control
28
- of what is generated. JSON Builder hopes to solve that problem.
29
- email:
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: tzinfo
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *id002
48
+ description: Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem.
49
+ email:
30
50
  - me@garrettbjerkhoel.com
31
51
  executables: []
52
+
32
53
  extensions: []
54
+
33
55
  extra_rdoc_files: []
34
- files:
56
+
57
+ files:
35
58
  - .gitignore
59
+ - .travis.yml
36
60
  - Gemfile
37
61
  - Gemfile.lock
38
62
  - MIT-LICENSE
@@ -54,40 +78,41 @@ files:
54
78
  - test/member_test.rb
55
79
  - test/test_helper.rb
56
80
  - test/value_test.rb
81
+ has_rdoc: true
57
82
  homepage:
58
83
  licenses: []
84
+
59
85
  post_install_message:
60
86
  rdoc_options: []
61
- require_paths:
87
+
88
+ require_paths:
62
89
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
90
+ required_ruby_version: !ruby/object:Gem::Requirement
64
91
  none: false
65
- requirements:
66
- - - ! '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- segments:
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ hash: -1289439851901198119
96
+ segments:
70
97
  - 0
71
- hash: -1301567226691013722
72
- required_rubygems_version: !ruby/object:Gem::Requirement
98
+ version: "0"
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
100
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- segments:
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ hash: -1289439851901198119
105
+ segments:
79
106
  - 0
80
- hash: -1301567226691013722
107
+ version: "0"
81
108
  requirements: []
109
+
82
110
  rubyforge_project:
83
- rubygems_version: 1.8.10
111
+ rubygems_version: 1.3.7
84
112
  signing_key:
85
113
  specification_version: 3
86
- summary: Rails provides an excellent XML Builder by default to build RSS and ATOM
87
- feeds, but nothing to help you build complex and custom JSON data structures. The
88
- standard to_json works well, but can get very verbose when you need full control
89
- of what is generated. JSON Builder hopes to solve that problem.
90
- test_files:
114
+ summary: Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem.
115
+ test_files:
91
116
  - test/benchmarks/builder.rb
92
117
  - test/compiler_test.rb
93
118
  - test/elements_test.rb