-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
Hello
this piece of code throws an exception BadCastException, the reason is that the types are not properly tested in the method "void Stringifier :: stringify (const Var & any, std :: ostream & out, unsigned int indent)".
it lacks the verfication following cases: any.type () == typeid (Object) && any.type () == typeid (Array)
int main(int argc, char** argv) {
JSON::Object obj;
JSON::Array array;
JSON::Object obj2;
obj.set("array", array);
obj.set("obj2", obj2);
obj.stringify(std::cout);
return 0;
}thank you for telling me if I'm wrong
Fabrizio
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels