Cpp While Loop Syntax Json Validator Code