PIJSON::print (and toJSON()) now use "null" for unknown type, resulting valid JSON
This commit is contained in:
@@ -547,7 +547,7 @@ void PIJSON::print(PIString & s, const PIJSON & v, PIString tab, bool spaces, bo
|
||||
if (spaces) s += ' ';
|
||||
}
|
||||
switch (v.c_type) {
|
||||
case PIJSON::Invalid: break;
|
||||
case PIJSON::Invalid:
|
||||
case PIJSON::Null: s += "null"; break;
|
||||
case PIJSON::Boolean: s += PIString::fromBool(v.c_value.toBool()); break;
|
||||
case PIJSON::Number: s += v.c_value.toString(); break;
|
||||
|
||||
Reference in New Issue
Block a user