mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user