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

Support json_decode assoc #286

Merged
merged 4 commits into from
Aug 2, 2016

Conversation

boekkooi-fresh
Copy link
Contributor

Q A
Branch? "master"
Bug fix? no
New feature? yes
BC breaks? Since Constraint::CHECK_MODE_TYPE_CAST was not actively used I would say no
Deprecations? no
Tests pass? yes
Fixed tickets #267
License MIT

Hi there,

I was running into the problem where json_decode($input, true) was not validation as I was hoping.
To fix the problem I implemented a special TypeCheckInterface this will now be used to determine if something is a object, array and will do special logic to get properties etc.

I need to add some special cases where tests failed because of the array structure.

To use the json_decode($input, true) with the Validator a user must set the checkMode to Constraint::CHECK_MODE_TYPE_CAST.

I hope you like the PR and I'm looking forward to the comments.

Cheers,
Warnar

@boekkooi-fresh
Copy link
Contributor Author

Hey @bighappyface did you have time to take a look at this PR?

@bighappyface
Copy link
Collaborator

@boekkooi-fresh I have a whole day scheduled to OSS maintenance on Friday and will review it then.

@boekkooi-fresh
Copy link
Contributor Author

@bighappyface Great! Thank you! I'm looking forward to your comments and sorry for bugging 😄

@bighappyface
Copy link
Collaborator

+1

@bighappyface bighappyface merged commit ddabcf8 into jsonrainbow:master Aug 2, 2016
@boekkooi-fresh
Copy link
Contributor Author

@bighappyface Thank you for the merge and maintaining this library!

@boekkooi-fresh boekkooi-fresh deleted the array-as-object branch August 2, 2016 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants