1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 23:45:08 +00:00

FormCompiler: Oops, need to use JsonValue::serialized() for properties

When assigning properties, we were relying on the JSON serialization
code to wrap strings in double-quotes ("). JsonValue::to_string() does
not wrap string values, so what we want here is serialized(). :^)
This commit is contained in:
Andreas Kling 2019-08-07 22:09:33 +02:00
parent 351c354680
commit c258c9a4b2

View file

@ -80,7 +80,7 @@ int main(int argc, char** argv)
if (property_value.is_null()) if (property_value.is_null())
value = "{}"; value = "{}";
else else
value = property_value.to_string(); value = property_value.serialized<StringBuilder>();
dbg() << " " << name << "->set_" << property_name << "(" << value << ");"; dbg() << " " << name << "->set_" << property_name << "(" << value << ");";
}); });