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

Add sample code of JSON.create_id #1613

Merged
merged 2 commits into from Feb 4, 2020

Conversation


json = JSON.generate(User.new(1, "tanaka"))
json # => "{\"json_class\":\"User\",\"id\":1,\"name\":\"tanaka\"}"
JSON.parse(json, create_addition: true)

This comment has been minimized.

Copy link
@hanachin

hanachin Feb 4, 2020

Member
Suggested change
JSON.parse(json, create_addition: true)
JSON.parse(json, create_additions: true)
json = JSON.generate(User.new(1, "tanaka"))
json # => "{\"json_class\":\"User\",\"id\":1,\"name\":\"tanaka\"}"
JSON.parse(json, create_addition: true)
# => {"json_class"=>"User", "id"=>1, "name"=>"tanaka"}

This comment has been minimized.

Copy link
@hanachin

hanachin Feb 4, 2020

Member
Suggested change
# => {"json_class"=>"User", "id"=>1, "name"=>"tanaka"}
=> #<User:0x0000557709b269e0 @id=1, @name="tanaka">
@hanachin hanachin merged commit bb62b66 into rurema:master Feb 4, 2020
2 of 3 checks passed
2 of 3 checks passed
rake
Details
misspell
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@tbpgr tbpgr deleted the tbpgr:add_sample_code_of_json_s_create_id branch Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.