[Old Mission] OA 2025 start – 28 Jan (General)

Implement a JSON string parser in C++.
Use std::variant to hold either a raw character pointer (const char*) or a vector of character pointers (std::vector<const char*>).
The parser should handle the following cases:

  1. Single string input
    • Example:"hello world"
      • Should be stored as const char* inside std::variant.
  2. Array of strings
    • Example:["hello world"]
      • Should be stored as std::vector<const char*>.
  3. Multiple strings in an array
    • Example:["hello world", "!"]
      • Should be stored as std::vector<const char*> with multiple elements.
  4. Edge cases:
    • Empty string: ""
    • Empty array: []

Ensure proper memory management and avoid memory leaks.
Good luck!


我们长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。

We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.

Leave a Reply

Your email address will not be published. Required fields are marked *