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

fix: Makes encoding always transform empty tables into arrays #174

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

jonathanlazaro1
Copy link
Contributor

Description

This PR adds the flag encode_empty_table_as_object with the value false, in order to ensure that empty Lua tables will always be transformed into empty JSON arrays when using cjson.encode.

How Has This Been Tested?

I made a request where the previous version of the plugin was enabled and confirmed that the problem was occurring:
image

Then I applied this version of the plugin and made the same request again. This time, empty arrays were correctly preserved:
image

Copy link

⚠️ Este repositório ainda não está catalogado no Backstage. ⚠️

Por favor, catalogue-o seguindo as instruções nesta documentação. [Via VPN].

💁 Qualquer dúvida, sinta-se à vontade para entrar em contato conosco no canal do Slack #backstage .

@jonathanlazaro1 jonathanlazaro1 marked this pull request as ready for review December 12, 2023 14:18
@jonathanlazaro1 jonathanlazaro1 merged commit 3817b41 into develop Dec 12, 2023
2 checks passed
@jonathanlazaro1 jonathanlazaro1 deleted the fix/cjson-encoding-flag branch December 12, 2023 14:24
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.

None yet

3 participants