yosh-matsuda / cpp-yyjson

Ultra-fast and intuitive C++ JSON reader/writer with yyjson backend
MIT License
63 stars 6 forks source link

Issue with convert value string into std::string and vice versa #15

Closed tuongbuimtt closed 7 months ago

tuongbuimtt commented 7 months ago

Sometimes my output JSON has an invalid utf-8 string. It seems to appear in a random position. My JSON has many nested fields, and adding one by one. I mainly write values from std::string. Do you have any advice for my case?

"sid":"1420\u0000\u0000\u0000\u00003649932"
the correct string is 14203649932

Thanks.