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

Json keys #7944

Merged
merged 3 commits into from Jul 23, 2019

Conversation

@asterite
Copy link
Member

commented Jul 1, 2019

Fixes #7942

Also document a bit the type-safe way to parse JSON (I don't think it was documented before, and mapping/serializable doesn't count because it doesn't talk about primitive types, Array, Hash, etc.)

I decided to only provide out-of-the-box serialization of json object keys for ints and floats, because their text representation is pretty obvious. Other types are more controversial but could be provided by shards.

Show resolved Hide resolved src/json.cr Outdated
@RX14
Copy link
Member

left a comment

Just a 1-character fix :P

Show resolved Hide resolved src/json.cr Outdated
Show resolved Hide resolved src/json.cr Outdated

@asterite asterite force-pushed the asterite:json-keys branch from 404f2ab to df46039 Jul 19, 2019

@RX14

RX14 approved these changes Jul 23, 2019

Copy link
Member

left a comment

Sorry for the delay

@RX14 RX14 added this to the 0.30.0 milestone Jul 23, 2019

@RX14 RX14 merged commit 2fa9648 into crystal-lang:master Jul 23, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.