Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Add JSON_NUMERIC_CHECK to convert strings to numerics#32

Open
anwell wants to merge 1 commit intoreactjs:master from
anwell:master
Open

Add JSON_NUMERIC_CHECK to convert strings to numerics #32
anwell wants to merge 1 commit intoreactjs:master from
anwell:master

Conversation

@anwell
Copy link

@anwell anwell commented Aug 6, 2017

Many PHP database driver implementations return all query results as strings and do not do any type conversion. This is usually insignificant because PHP will perform implicit type conversions when necessary.

But for React/JSON we need these types to be explicit. The JSON_NUMERIC_CHECK flag for json_encode will detect strings that are like numbers and convert them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /