mirror of
https://github.com/pantor/inja.git
synced 2026-10-13 15:57:14 +00:00
include nlohmann/json in inja directly
This commit is contained in:
1 parent
0029a130ab
commit
71cfb21e61
10 files changed
+8
-13
No files matched your search
@@ -22,11 +22,11 @@ inja::render("Hello {{ name }}!", data); // Returns "Hello world!"
|
||||
|
||||
## Integration
|
||||
|
||||
Inja is a headers only library, which can be downloaded from the [releases](https://github.com/pantor/inja/releases) or directly from the `src/` folder. Inja uses json by nlohmann as its single dependency, so make sure that it is included before inja. json can be found [here](https://github.com/nlohmann/json/releases).
|
||||
Inja is a headers only library, which can be downloaded from the [releases](https://github.com/pantor/inja/releases) or directly from the `src/` folder. Inja uses `nlohmann/json.hpp` as its single dependency, so make sure it can be included from `inja.hpp`. json can be downloaded [here](https://github.com/nlohmann/json/releases). Then integration is as easy as:
|
||||
|
||||
```c++
|
||||
#include "json.hpp"
|
||||
#include "inja.hpp"
|
||||
#include <inja.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// For convenience
|
||||
using namespace inja;
|
||||
|
||||
Reference in new issue
Block a user