Add to_string() convenience functions for Json and related types
- Dominant language
- C++
- Stars
- 5
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Add free function overloads of to_string() in the jsrl namespace for Json and related types, providing a concise, idiomatic way to serialize a JSON value to a std::string without requiring callers to write std::format("{}", j) or construct a std::ostringstream.
jsrl_format.hpp already provides std::formatter specializations for all major jsrl types, but it would be nice to be able to just ask for a string and get one with a call something like this. `std::string s = jsrl::to_string(json);`
Contributor guide
Research direction
Start in jsrl_format.hpp by reviewing the existing std::formatter specializations for Json and the related jsrl types. Add the requested jsrl::to_string() overloads so callers receive a std::string without formatting or stream construction; done means the overloads cover the intended major types and serialize their values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100