An old JSON parsing mission
What this preview is
An old JSON parsing mission is a medium quant coding problem on language knowledge in Cpp.
- Difficulty
- Medium
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Cpp
What this C++ JSON parsing problem tests
This is a medium-difficulty coding problem that asks you to implement a recursive descent parser for a lightweight JSON subset. It appears frequently in technical interviews at trading firms and finance technology companies because it combines string handling, memory management, and recursive algorithm design in a compact, realistic scope.
The problem rewards clean separation of concerns: tokenizing input, recursively parsing structure, and reconstructing canonical output. You will need to handle both leaf values (strings) and composite structures (arrays) using a variant type, manage string_view correctly to avoid copies, and ensure your parser gracefully skips whitespace while respecting JSON syntax rules. Interviewers often probe your approach to error handling, your reasoning about memory lifetime, and whether you can trace through nested parse calls.
- Recursive descent parsing and grammar rules
- String parsing and escape-free lexing
std::variantand discriminated unions- Round-trip serialization (parse-to-string consistency)
- Pointer validity under
string_viewsemantics
Unlock full access to getcracked
Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.