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

added fuzzy decoding for booleans, added ability to decode numeric keyed objects as arrays with fizzy decoder #500

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

masterada
Copy link
Contributor

rel #486

  • decode the followings as boolean: "true", "false", 0, 1, "0", "1".
  • allow unmarshalling numeric keyed objects with strictly increasing keys as array, eg: {"0": "a", "2": "b"}

The later is neccessary because of the "unset" php method, eg:

<?php

$a = ["a", "b", "c"];
echo json_encode($a); // prints ["a","b","c"]

unset($a[1]);
	
echo json_encode($a); // prints {"0":"a","2":"c"}

@masterada
Copy link
Contributor Author

@taowen @AllenX2018 can some1 take a look at this please?

@pongraczgabor87
Copy link

@AllenX2018 Could you check this out? Would be nice to see these changes in one of the following releases.

@pongraczgabor87
Copy link

@taowen Would you have time to look into this?

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