Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigasdev/castledb-cpp-parser
A simple cpp parser for CastleDB
https://github.com/bigasdev/castledb-cpp-parser
castledb cpp cpp-json json parser
Last synced: about 2 months ago
JSON representation
A simple cpp parser for CastleDB
- Host: GitHub
- URL: https://github.com/bigasdev/castledb-cpp-parser
- Owner: bigasdev
- License: mit
- Created: 2024-05-16T13:57:30.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-17T10:40:56.000Z (7 months ago)
- Last Synced: 2024-05-17T15:59:59.650Z (7 months ago)
- Topics: castledb, cpp, cpp-json, json, parser
- Language: C++
- Homepage: https://bigasdev.net/?tab=home
- Size: 597 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CastleDB-cpp-parser
_Quickly parse your CastleDB for use in your C++ codebase. It supports hot reload!_
## Usage
Include the files located in the **.src/** folder in your codebase, then instantiate the CastleDBConverter class constructor to retrieve the data.
```
CastleDBConverter converter("res/helloworld.json");
```Then extract your data, a nice feature is that you can grab only the fields you need.
```
//sheet name //fields
data_db = converter.extract_data("HelloWorld", {"Name", "X", "Y", "Char"});
```Use the update method to check for updates in the file for hot reload support
```
if(converter.update("res/helloworld.json")){
//your code
}
```## Thanks
Thanks for [ncannasse](https://github.com/ncannasse) for the creation of [CastleDB](https://github.com/ncannasse/castle) and to [nlohmann](https://github.com/nlohmann) for [json parser](https://github.com/nlohmann/json)