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:
Andreas Kling 2021-06-29 22:19:29 +02:00
parent 9766fccb88
commit 0dbf786aed
2 changed files with 6 additions and 2 deletions

View file

@ -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
}

View file

@ -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