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

parsing option 'scalar': true|false|null will be scalar #13

Merged
merged 1 commit into from
Dec 5, 2023
Merged

parsing option 'scalar': true|false|null will be scalar #13

merged 1 commit into from
Dec 5, 2023

Conversation

vanodevium
Copy link
Contributor

#8

Just use like

convertToJson($jsonString, true);
convertToArray($jsonString, true);

@ovidyou
Copy link
Member

ovidyou commented Dec 5, 2023

Thanks @vanodevium for your contribution.

I acknowledge the issue described in #8 as a bug and that true, false and null should be transformed to JSON scalar values and not strings. In this regard, I don't see a reason why we should also keep the old behaviour through introducing the bool $scalar param to the convertToJson() and convertToArray() methods.

Could you remove the bool $scalar param? I will approve your contribution afterwards.

@vanodevium
Copy link
Contributor Author

@ovidyou

done

@ovidyou ovidyou merged commit a38bc6a into ovidigital:master Dec 5, 2023
0 of 5 checks passed
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