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(TomlTable): fixes key serialization by adding better key name checks #33

Merged
merged 3 commits into from
Jul 16, 2023

Conversation

tcortega
Copy link
Contributor

@tcortega tcortega commented Jul 14, 2023

Uses a foreach to iterate through the key strings both in the table and during object serialization to identify which keys needs to be quoted in a performative way.

Also made a small optimization in the methods inside TomlUtils.

The tests might not look that good, feel free to change it if you want. Or give me a heads up on what you have in mind for the tests.

Closes #30
Closes #31

Using chars in the Contains method is not possible for every framework the project supports.
@SamboyCoding
Copy link
Owner

Can you rebase this onto latest?

@coveralls
Copy link

Coverage Status

coverage: 92.423% (+0.3%) from 92.162% when pulling bbbd3e0 on tcortega:fix/key-escaping-check into 4729d95 on SamboyCoding:master.

@SamboyCoding SamboyCoding merged commit 8dc1129 into SamboyCoding:master Jul 16, 2023
1 check passed
SamboyCoding added a commit that referenced this pull request Mar 20, 2024
Caused by a regression in #33 that wasn't caught. Added a test to ensure it is caught in future.
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.

Keys with symbols aren't quoted but they should be
3 participants