Switch to turn off emitted comments

Open
#1,165 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start by reading the emitter’s stream modifier handling and the code that emits comments. Identify how modifier state affects output, then check existing emitter tests for a suitable place to cover disabling comments. Done means a modifier can turn off emitted comments while preserving the normal output when it is not used.

Written by the indexing model from the issue text.

Description

enhancement help wanted

I really love using
emitter << Comment << "This is a good day to comment";

However, I've found a use case where I want to emit as plain JSON (and parse with nlohmann::json). It would be convient to have a stream modifier that turns off comments, like
emitter << DisableComments

Dominant language
C++
Stars
6.1k
Forks
2.2k
Avg merge
22h 2m
Merged PRs (30d)
1

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 jbeder/yaml-cpp

All issues in jbeder/yaml-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.