Skip to content

Fixnum object keys work with OkJson#66

Merged
sferik merged 2 commits intointridea:masterfrom
rwz:fixnum-specs
Dec 10, 2012
Merged

Fixnum object keys work with OkJson#66
sferik merged 2 commits intointridea:masterfrom
rwz:fixnum-specs

Conversation

@rwz
Copy link
Copy Markdown
Member

@rwz rwz commented Dec 10, 2012

No description provided.

@rwz
Copy link
Copy Markdown
Member Author

rwz commented Dec 10, 2012

I've decided to test how different engines behave with fixnum object keys. And since Oj resolved the issue in it's last update, the only engine that doesn't work with fixnum keys would be OkJson.

@sferik
Copy link
Copy Markdown
Member

sferik commented Dec 10, 2012

I'd be willing to merge a similar patch, but this one seems too specific. What if the number is a Bignum? Or a Float? I think a better approach would be to check whether the key respond to to_s and convert it if it does.

@rwz
Copy link
Copy Markdown
Member Author

rwz commented Dec 10, 2012

@sferik, makes sense. I've rebased the pull-request to match your suggestion

@sferik
Copy link
Copy Markdown
Member

sferik commented Dec 10, 2012

Looks good. I'll be releasing version 1.5 shortly with your changes included.

sferik added a commit that referenced this pull request Dec 10, 2012
Fixnum object keys work with OkJson
@sferik sferik merged commit ecd2e50 into intridea:master Dec 10, 2012
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this pull request Dec 9, 2013
1.6.0
-----
* [Add gson.rb support](intridea/multi_json#71)
* [Add MultiJson.default_options](intridea/multi_json#70)
* [Add MultiJson.with_adapter](intridea/multi_json#67)
* [Stringify all possible keys for ok_json](intridea/multi_json#66)
* [Alias `MultiJson::DecodeError` to `MultiJson::LoadError`](intridea/multi_json#79)
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this pull request Mar 14, 2014
1.6.0
-----
* [Add gson.rb support](intridea/multi_json#71)
* [Add MultiJson.default_options](intridea/multi_json#70)
* [Add MultiJson.with_adapter](intridea/multi_json#67)
* [Stringify all possible keys for ok_json](intridea/multi_json#66)
* [Alias `MultiJson::DecodeError` to `MultiJson::LoadError`](intridea/multi_json#79)
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 11, 2014
1.6.0
-----
* [Add gson.rb support](intridea/multi_json#71)
* [Add MultiJson.default_options](intridea/multi_json#70)
* [Add MultiJson.with_adapter](intridea/multi_json#67)
* [Stringify all possible keys for ok_json](intridea/multi_json#66)
* [Alias `MultiJson::DecodeError` to `MultiJson::LoadError`](intridea/multi_json#79)
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

Successfully merging this pull request may close these issues.

2 participants