mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Kernel+AK: Don't compile JSON parser into the kernel
The kernel doesn't consume JSON, it only produces it. So there's no need for the kernel to have a JSON parser built into it. :^)
This commit is contained in:
parent
9766fccb88
commit
0dbf786aed
Notes:
sideshowbarker
2024-07-18 11:16:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0dbf786aed1
2 changed files with 6 additions and 2 deletions
|
@ -6,9 +6,12 @@
|
|||
|
||||
#include <AK/JsonArray.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/JsonParser.h>
|
||||
#include <AK/JsonValue.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/JsonParser.h>
|
||||
#endif
|
||||
|
||||
namespace AK {
|
||||
|
||||
JsonValue::JsonValue(Type type)
|
||||
|
@ -224,9 +227,11 @@ void JsonValue::clear()
|
|||
m_value.as_string = nullptr;
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
Optional<JsonValue> JsonValue::from_string(const StringView& input)
|
||||
{
|
||||
return JsonParser(input).parse();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -301,7 +301,6 @@ set(AK_SOURCES
|
|||
../AK/FlyString.cpp
|
||||
../AK/GenericLexer.cpp
|
||||
../AK/Hex.cpp
|
||||
../AK/JsonParser.cpp
|
||||
../AK/JsonValue.cpp
|
||||
../AK/LexicalPath.cpp
|
||||
../AK/String.cpp
|
||||
|
|
Loading…
Reference in a new issue