Checkpoint: Serializer with specialization
Challenge on lesson: Checkpoint: Serializer
CHALLENGE
Difficulty: intermediate+25 XP
Implement template <typename T> struct Serializer with static std::string to(const T&) producing std::to_string(v); a **full specialization** for std::string returning the string unchanged; and a **partial specialization** for std::vector<T> producing "[a,b,c]" (no spaces), recursively serializing elements. Nested vectors must work: a std::vector<std::vector<int>> serializes as "[[1,2],[3]]".
Press Submit to check your solution.
Back to lesson: Checkpoint: Serializer