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

handle encoding of number based key properties #43

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

Conversation

confessore
Copy link

i was unable to encode a table due to some number based key properties.

i modified the encode function to check for number based keys in addition to the already present string based keys.

an error will still be returned if the key is neither string nor number based.

it works in my cases

i was unable to encode a table due to some number based key properties.

i modified the encode function to check for number based keys in addition to the already present string based keys.

an error will still be returned if the key is neither string nor number based.

it works in my cases
alexandro-rezakhani added a commit to alexandro-rezakhani/json.lua that referenced this pull request Nov 20, 2022
i was unable to encode a table due to some number based key properties.

i modified the encode function to check for number based keys in addition to the already present string based keys.

an error will still be returned if the key is neither string nor number based.

it works in my cases


Please see this link:
rxi#43 (comment)
Copy link

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dirty: String and number keys are not the same in Lua.

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