Skip to content

[ENHANCEMENT] Sanitize .json text before parsing #5108

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KoloInDaCrib
Copy link
Contributor

Description

Sometimes when converting Bytes directly into a String, a bit of gibberish would be left at the start or end, causing the json parsing process to throw an error. This PR adds automatic removal of said gibberish before parsing a json text with SerializerUtil, which would spare modders having to do this themselves or struggling to find the issue.

@github-actions github-actions bot added status: pending triage Awaiting review. size: small A small pull request with 10 or fewer changes. pr: haxe PR modifies game code. labels May 17, 2025
@AbnormalPoof AbnormalPoof added the type: minor bug Involves a minor bug or issue. label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: small A small pull request with 10 or fewer changes. status: pending triage Awaiting review. type: minor bug Involves a minor bug or issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants