Add more examples for Document API
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- documentation
Research direction
Start in the linked example directory and compare its contents with the supplied C++ Document API snippet. Add the requested examples there, following the shown include and build command; done means the examples demonstrate the Document API and compile with the provided g++ command.
Written by the indexing model from the issue text.
Description
We need to add more examples for Document API into example directory
The example should be like follows:
#include <iostream>
#include <string>
#include "sonic/sonic.h"
int main() {
using NodeType = sonic_json::Node;
using Allocator = typename NodeType::AllocatorType;
sonic_json::Node node;
Allocator alloc;
node.SetObject();
node.AddMember("Key", NodeType("Value", alloc), alloc);
std::cout << "Add member successfully!\n";
return 0;
}
// g++ -I../include/ -march=haswell --std=c++11 get_and_set.cpp -o get_and_set
- Dominant language
- C++
- Stars
- 977
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/sonic-cpp
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
请问下,下个release版本有规划了吗Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
对 parseImpl 进行优化Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
sonic 能在 mac 上测试吗Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
U64toa 单元测试用例不通过Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in bytedance/sonic-cpp
Similar issues
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EnzymeAD/Enzyme-JAX#3286 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/iceberg-cpp#973 ·
Maintainers usually reply within 1 day
-
feature request
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day