Skip to content

Escape JSON strings#11

Open
bkvaluemeal wants to merge 2 commits into
Apaezmx:mainfrom
bkvaluemeal:main
Open

Escape JSON strings#11
bkvaluemeal wants to merge 2 commits into
Apaezmx:mainfrom
bkvaluemeal:main

Conversation

@bkvaluemeal

Copy link
Copy Markdown

This modifies pb_to_json_inner in src/json.c to iterate through strings and escape double quotes, backslashes, and control characters like newlines and tabs to avoid creating invalid JSON. I tested on my end, and it works for my needs, Perhaps the community would be interested in this.

google-labs-jules Bot and others added 2 commits June 6, 2026 19:38
This modifies `pb_to_json_inner` in `src/json.c` to iterate through strings
and properly escape double quotes, backslashes, and control characters like
newlines and tabs to avoid creating invalid JSON. Tests were added.

Co-authored-by: bkvaluemeal <3835053+bkvaluemeal@users.noreply.github.com>
Fix pb_to_json to properly escape strings
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.

1 participant