Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Proposal: friendly list initialization for document or node.

Open
#58 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by locating the Document and node construction APIs and reviewing how objects, members, and arrays are currently initialized. Define and validate the C++11 initializer-list behavior shown in the issue, with completion marked by the examples compiling and producing the intended nested values.

Written by the indexing model from the issue text.

Description

good first issue proposal

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}}};
Dominant language
C++
Stars
976
Forks
128
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bytedance/sonic-cpp

All issues in bytedance/sonic-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.