summaryrefslogtreecommitdiff
path: root/src/json.cc
AgeCommit message (Collapse)Author
2024-08-26Fix includes for debug buildMaxime Coste
Looks like we've been over eager with removing unused includes and did not realize they were only unused in optimized builds.
2024-08-14Remove unused wrap_to and reduce string_utils headersMaxime Coste
2023-12-10Fix compiler warnings when char is unsignedChris Webb
In several places, we check for a control character with something like char c; [...] if (c >= 0 and c <= 0x1F) [...] When char is signed (e.g. amd64) this is fine, but when char is unsigned by default (e.g. arm32 and arm64) this generates warnings about the tautologous check that an unsigned value is non-negative. Write as if ((unsigned char) c <= 0x1F) [...] which is both correct and not suspicious under both conventions.
2023-11-03Add support for 0-padding in format and replace uses of sprintfMaxime Coste
2021-12-11Fix spurious warning likely due to String::Data not being std compliantMaxime Coste
2020-03-04Fix invalid memory access in unit-testsMaxime Coste
2019-11-17src json: Limit the recursion depth to 100Frank LENORMAND
2019-11-17src: Move JSON parsing code to its own fileFrank LENORMAND
The `json_ui.cc` file contained both data-parsing and UI-related code. This commit moves the JSON parsing code to its own `json.cc` file, to separate concerns, make compilation faster when changes are made to either UI or parsing code, and make the parsing code more accessible to fuzzers. The signature of the following function: ``` auto parse_json(StringView json); ``` was changed to: ``` JsonResult parse_json(StringView json); ``` to avoid `auto` deduction issues at compile-time.