unexpected character appear from method folly::toJson
Abierto
- Lenguaje dominante
- C++
- Estrellas
- 30.5k
- Forks
- 5.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
- recreate step :
```
#include
#include
#include
#include
int main()
{
std::string str = "dev's work";
std::string sign = "\'\\\'\'";
boost::replace_all(str, "'", sign);
std::cout << str << std::endl;
folly::dynamic itemValue = folly::dynamic::object("value", str);
auto target = folly::toJson(itemValue);
std::cout << target << std::endl;
return 0;
}
```
`g++ -g test.cpp -o test -I/path/include -L/path/lib -lfolly`
```
$ ./test
dev'\''s work
{"value":"dev'\\''s work"}
```
- expected :
`{"value":"dev'\''s work"}`
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.