Save and read multiline text as-is
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start from the YAML::Literal manipulator and the emitter path that writes literal block scalars, then reproduce the problem with a small program that emits a string ending in several newlines and reads it back. Check how the trailing newlines are dropped on write and how a newline is added on read. Done means the round trip keeps the exact trailing newlines and the existing emitter and parser tests still pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I need to save text data to a YAML file exactly as it is, so that another program can subsequently read the file and transmit the data over the network without modification. At the same time, I need to maintain the YAML file's readability.
To preserve readability when saving the text data, I use the YAML::Literal manipulator.
The problem with this manipulator is that it strips all trailing newlines from the text, whereas I need to preserve them. Additionally, when reading the data back as a std::string, a newline character (\n) is appended to the end.
In other words, I need to save text data to YAML file exactly as is and be able to read it back exactly as is. Does yaml-cpp provide any mechanisms for this?
- Lingua principale
- C++
- Stelle
- 6.1k
- Fork
- 2.2k
- Merge medio
- 22h 2m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jbeder/yaml-cpp
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
Tutte le issue di jbeder/yaml-cpp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
meshcore-dev/MeshCore#3760 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
deepseek-ai/DeepGEMM-Ascend#29 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
EchoTools/nevr-runtime#2042 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
emscripten-core/emscripten#28160 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Download size and speed show scientific notation between 1000 and 1023 unitsForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 88/100
kiwix/kiwix-desktop#1570 ·
I maintainer di solito rispondono entro 1 giorno