https://github.com/timothygu/json-parser-cpp
Toy JSON parser written in C++20
https://github.com/timothygu/json-parser-cpp
Last synced: about 1 year ago
JSON representation
Toy JSON parser written in C++20
- Host: GitHub
- URL: https://github.com/timothygu/json-parser-cpp
- Owner: TimothyGu
- Created: 2021-09-07T23:07:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-07T23:08:09.000Z (over 4 years ago)
- Last Synced: 2025-02-05T21:02:21.515Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Toy C++ JSON parser
**Toy project. Do not use in production.**
This is a JSON parser written in modern C++. Here are some of the more
interesting bits of the API:
```c++
namespace json {
using Object = std::unordered_map>;
using Array = std::vector>;
class Value : public std::variant { /* ... */ };
std::optional Parse(std::string_view);
Value Clone(const Value&);
} // namespace json
```
Requires a C++ compiler that supports C++20, as well as ICU4C.
## Organization
* main.cc is a test program.
* json.h exposes a public API.
* parse.h and unicode.h contain internal utilities.