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

(Breaking) Make Lua.Table.as_string more powerful #48

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

davydog187
Copy link
Contributor

@davydog187 davydog187 commented Sep 27, 2024

Changes the API of Lua.Table.as_string/2 so that it can take a :formatter option, which can format any value prior to serialization. The function is a 2-arity function that takes the key and value, and can transform the value prior to serialization.

This deprecates the :userdata option, which will now raise an exception if passed.

Also allows as_string/2 to take lists.

Changes the API of `Lua.Table.as_string/2` so that it can take a
`:formatter` option, which can format any value prior to serialization.
The function is a 2-arity function that takes the key and value, and can
transform the value prior to serialization.

Also allows `as_string/2` to take lists
@davydog187 davydog187 merged commit 31826ed into main Sep 27, 2024
1 check passed
@davydog187 davydog187 deleted the allow-lists branch September 27, 2024 14:57
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.

1 participant