Support of ESC character

Alexei BARANTSEV's Avatar


21 Feb, 2019 03:18 PM


Your parser supports various lexical elements like '\n', '\t", etc.
There is one more element '\e' in GNU extension, see, page 9.
It is the ESC control character (27 dec or 1B hex) that is often used by printers to manage font styles.
I would like to use the dictionary like:
char *ctx = "{\"hello\" : \"Bonjour\",\"boldOn\" : \"\\eE\", \"boldOff\" : \"\\eF\"}";
And when I used it the result is empty.
To fix it I added one more case in the function process_string in the file parson.c:

case 'e':
*output_ptr = '\e';

After that I have no problem.
Please include this modification into the next release.

    Best regards
    Alexei BARANTSEV

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

11 Dec, 2022 09:57 PM
11 Dec, 2022 07:57 PM
26 Sep, 2022 02:40 AM
21 Jul, 2022 10:22 AM
11 Jan, 2022 02:33 PM

Recent Articles