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

Bug: Lua runtime - marshaling arrays #6655

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

Isan-Rivkin
Copy link
Contributor

@Isan-Rivkin Isan-Rivkin commented Sep 26, 2023

Closes #6654

What's changed: new helper function array when working with go-lua marshall.

This is a blocker for #6653 and to anyone that needs to marshal array types in a lua table.

This enables using array(...) function to mark a table as an array, same way we use it in deep_push.go.

Usage:

local arr = array({Value=1}) -- initialize array
json.marshal(arr) -- now works! 

@Isan-Rivkin Isan-Rivkin added the include-changelog PR description should be included in next release changelog label Sep 26, 2023
@Isan-Rivkin Isan-Rivkin self-assigned this Sep 26, 2023
@github-actions
Copy link

github-actions bot commented Sep 26, 2023

♻️ PR Preview d2b180c has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link
Contributor

@Jonathan-Rosenberg Jonathan-Rosenberg left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for the explanation!

@Isan-Rivkin Isan-Rivkin merged commit b092f7c into master Sep 27, 2023
37 checks passed
@Isan-Rivkin Isan-Rivkin deleted the bug/lua-array-helper branch September 27, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Marshaling Array type in Lua runtime
2 participants