mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
PixelPaint: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
ecbe317413
commit
c36de98223
3 changed files with 22 additions and 21 deletions
|
@ -34,8 +34,8 @@ ErrorOr<void> ProjectLoader::try_load_from_file(NonnullOwnPtr<Core::Stream::File
|
|||
auto& json = json_or_error.value().as_object();
|
||||
auto image = TRY(Image::try_create_from_pixel_paint_json(json));
|
||||
|
||||
if (json.has("guides"sv))
|
||||
m_json_metadata = json.get_deprecated("guides"sv).as_array();
|
||||
if (json.has_array("guides"sv))
|
||||
m_json_metadata = json.get_array("guides"sv).value();
|
||||
|
||||
m_image = image;
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue