bytedance / bytedance/sonic-cpp

Proposal: friendly list initialization for document or node.

Open
#58 2 comments 0 reactions 0 assignees View on GitHub
good first issue proposal
Dominant language
C++
Stars
976
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Now, initialization is complex as follows:
```
Document doc;
doc.SetObject();
doc.AddMember(key, value);
```

Can we use the c++11 initialization list:
```
Document doc { {"a", "b"}, {"c", false}, {"d", {1, 2, 3}}};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.