diff options
author | aabajyan <arsen.abajyan@pm.me> | 2021-03-20 18:46:22 +0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-21 09:37:51 +0100 |
commit | 8560108717976e804578b015115e2e05198adf0b (patch) | |
tree | cb9f6e5aa6781292127dacb56209c9f4d6a5e9e7 /Userland/Libraries/LibWeb/Loader | |
parent | 31f7296934777d97eae5386bfe42069cab1ea366 (diff) | |
download | serenity-8560108717976e804578b015115e2e05198adf0b.zip |
LibWeb: Add support to view JSON.
Extremely small change, all I did is check for application/json,
mime type and parsed it as text.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 956fa31295..de60ced9da 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -140,7 +140,7 @@ bool FrameLoader::parse_document(DOM::Document& document, const ByteBuffer& data } if (mime_type.starts_with("image/")) return build_image_document(document, data); - if (mime_type == "text/plain") + if (mime_type == "text/plain" || mime_type == "application/json") return build_text_document(document, data); if (mime_type == "text/markdown") return build_markdown_document(document, data); |