Commit Graph

1 Commits

Author SHA1 Message Date
Frank LENORMAND
7cdbe1d3d2 src: Move JSON parsing code to its own file
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.
2019-11-17 09:27:46 +01:00