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

1350: BUGFIX - Allow ansi code translation for json unescape. #1351

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

HarryCordewener
Copy link
Contributor

@HarryCordewener HarryCordewener commented Feb 25, 2021

This is related to the following ticket: #1350

src/notify.c Outdated Show resolved Hide resolved
src/funjson.c Show resolved Hide resolved
src/conf.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Show resolved Hide resolved
src/funjson.c Show resolved Hide resolved
src/notify.c Outdated Show resolved Hide resolved
@HarryCordewener
Copy link
Contributor Author

Ready for re-review.

hdrs/ansi.h Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
CHANGES.188.md Outdated Show resolved Hide resolved
src/funjson.c Outdated
@@ -64,6 +65,27 @@ json_escape_string(char *input)
return buff;
}

/** Unescape a string for use as a JSON string. Returns a calloced buffer under 'json.string.partialbuf'. **/
Copy link
Member

Choose a reason for hiding this comment

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

Needs a proper comment header documenting args and return values, and a more detailed/accurate description of what it's doing would be good - "unescape" isn't really descriptive of what it's doing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New comment header description added. Let me know if the description works as is.

src/funjson.c Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
src/funjson.c Outdated Show resolved Hide resolved
@HarryCordewener
Copy link
Contributor Author

HarryCordewener commented Jun 28, 2021

There's an error in here somewhere causing a one-off error with \0 in json_map for the value, as it puts the null too far to the right.

Debug:
https://pastebin.com/FgTANMJE

Edit: Fix being tested in production.

@HarryCordewener
Copy link
Contributor Author

This has been in production for a few months now. But I gotta figure out what is going on with the unit test's test harness.

@HarryCordewener
Copy link
Contributor Author

Tests fixed. Ready for a new look @talvo

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

2 participants