mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Everywhere: Add deprecated_ prefix to JsonValue::to_byte_string
`JsonValue::to_byte_string` has peculiar type-erasure semantics which is not usually intended. Unfortunately, it also has a very stereotypical name which does not warn about unexpected behavior. So let's prefix it with `deprecated_` to make new code use `as_string` if it just wants to get string value or `serialized<StringBuilder>` if it needs to do proper serialization.
This commit is contained in:
committed by
Andrew Kaster
parent
4ed5287792
commit
ccd701809f
@@ -108,11 +108,7 @@ void print(JsonValue const& value, int spaces_per_indent, int indent, bool use_c
|
||||
else if (value.is_null())
|
||||
out("\033[34;1m");
|
||||
}
|
||||
if (value.is_string())
|
||||
out("\"");
|
||||
out("{}", value.to_byte_string());
|
||||
if (value.is_string())
|
||||
out("\"");
|
||||
out("{}", value);
|
||||
if (use_color)
|
||||
out("\033[0m");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user