Closed pnaulls closed 8 years ago
Thanks for finding the issue. This is the part of the lower level parser that has given me some grief. At one point I had made a decision to cluster punctuation marks.. This made it easy to implement things like += >> and other operators... but it has caused issues.. I had added a single mode for this reason, it turns out that some combinations like ,- are never right. So this has been fixed.
I found that if value in an array is negative (other than the first value), it won't parse.
See:
include "jvar.h"
using namespace jvar;
int main(int argc, char* argv) { const char test = "{\"angle\":[171.8,20,2,3,-96.3,20.6]}";
}
Gives: Json parsing failed: Parser error: Invalid value ',-' at line 1
Not knowing the full workings of state engine the parser, I propose this fix: