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

Make go module, marshal userdata as json(null), and encode sparse arrays #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mikefero
Copy link

To improve the gopher-json encoding aspects lua.UserData types detected are replaced as JSON null values and the encoding of sparse arrays is now possible where the key/index and value from the array item are combined to form the JSON value:

{
  1,
  2,
  [10] = 3
}

=>

[
  1,
  2,
  "[10] = 3"
]

hbagdi and others added 3 commits December 16, 2022 09:30
This fix allows for sparse array and converts the key (which is the
index in this case) into part of the JSON encoded output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants