Closed vinipsmaker closed 3 years ago
I was caught by surprise here. I thought I could mirror the loop at
https://github.com/breese/trial.protocol/blob/cbb39086fde32804e71e7d075267f4cbef946907/example/json/push_parser/push_parser.hpp#L29-L76
and only check for json::token::symbol::error afterwards to know if the JSON was valid. By now I see I also need to test for reader.level() == 0.
json::token::symbol::error
reader.level() == 0
Maybe this behaviour deserves some discussion? Not really sure what's the proper take here as I just stumbled upon it.
I have fixed this and the equivalent problem for end-of-object in 909633cda153346e9c637292bfe7da28267e324c
I was caught by surprise here. I thought I could mirror the loop at
https://github.com/breese/trial.protocol/blob/cbb39086fde32804e71e7d075267f4cbef946907/example/json/push_parser/push_parser.hpp#L29-L76
and only check for
json::token::symbol::error
afterwards to know if the JSON was valid. By now I see I also need to test forreader.level() == 0
.Maybe this behaviour deserves some discussion? Not really sure what's the proper take here as I just stumbled upon it.