JSON_C_TO_STRING_NOSLASHESCAPE
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 61
- Forks
- 35
- Avg merge
- 21m
- Merged PRs (30d)
- 2
Description
Hello!
I use libfastjson in Sagan to create & parse json strings. One feature that I notced json-c has that libfastjson does not it the JSON_C_TO_STRING_NOSLASHESCAPE option. For example:
json_object_to_json_string_ext(my_string, JSON_C_TO_STRING_NOSLASHESCAPE)
The allows me to build json strings without slash escapes. This can be really useful when trying to build multiple json objects within a json string. Right now, I have to resort to some rather kludgy means as a work around. Thank you!
References:
https://stackoverflow.com/questions/44588310/json-c-string-with-character
https://json-c.github.io/json-c/json-c-0.13/doc/html/json__object_8h.html#a5c11d72c55f3ab7c088f19e7bf118163
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the json_object_to_json_string_ext API named in the issue and trace how its option argument controls string escaping. Add support for JSON_C_TO_STRING_NOSLASHESCAPE so generated JSON omits slash escapes, then verify the behavior with a focused example or test covering nested JSON strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100