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

Add JSONObject.GetType() and JSONArray.GetType() methods #52

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

Conversation

Wend4r
Copy link
Contributor

@Wend4r Wend4r commented Jun 8, 2021

No description provided.

@Wend4r Wend4r changed the title Add JSONObject.GetType() and JSONArray.GetType() natives Add JSONObject.GetType() and JSONArray.GetType() methods Aug 6, 2021
@maxime1907
Copy link

@CrazyHackGUT @ErikMinekus Can you guys merge it ?

@CrazyHackGUT
Copy link
Contributor

I don't have permissions for merge in this repo.

@ErikMinekus
Copy link
Owner

ErikMinekus commented Mar 17, 2022

I don't have any plans to merge this at the moment. In my opinion, checking the type of a value to see which Get* function you need to call is not a good solution. You should already know the structure and types beforehand.

The only issue I see is that JavaScript encodes whole float numbers as integers, which I would like to solve in a different way.

@maxime1907
Copy link

I have a real use case for it right here if you want to know why we need this https://gitlab.com/counterstrikesource/sm-plugins/smjsonapi/-/blob/master/addons/sourcemod/scripting/SMJSONAPI.sp#L236

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.

4 participants