Skip to content

Commit 47eefe3

Browse files
committed
Updated README.md
1 parent 0049019 commit 47eefe3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,29 @@
44

55
Helper classes for create C++ Data Transfer Object
66

7+
## Integrate to your project
8+
9+
Include this files:
10+
11+
* src.wsjcpp/nlohmann_json/json.hpp
12+
* src/wsjcpp_dto.h
13+
* src/wsjcpp_dto.cpp
14+
15+
Or use a `wsjcpp`:
16+
17+
```
18+
$ wsjcpp install https://github.com/wsjcpp/wsjcpp-dto:master
19+
```
20+
21+
## How to use:
22+
23+
```
24+
class WsjcppDtoPerson : public WsjcppDefineDto {
25+
public:
26+
WsjcppDtoPerson() : WsjcppDefineDto("person", "Person") {
27+
// requireField<WsjcppDtoString>("name", "Name of person");
28+
requireField<WsjcppDtoString>("name", "Name of person");
29+
optionalField<WsjcppDtoInteger>("age", "Age of person");
30+
};
31+
};
32+
```

0 commit comments

Comments
 (0)