AK: Add JsonValue(const char*).

This should obviously become a string, but if we don't have it, constructing
from a string literal ends up creating a boolean value.
This commit is contained in:
Andreas Kling 2019-06-18 09:11:31 +02:00
parent 1a761ea4fd
commit 4147394dcb
2 changed files with 6 additions and 0 deletions

View file

@ -76,6 +76,11 @@ JsonValue::JsonValue(unsigned value)
}
}
JsonValue::JsonValue(const char* cstring)
: JsonValue(String(cstring))
{
}
JsonValue::JsonValue(double value)
: m_type(Type::Double)
{

View file

@ -34,6 +34,7 @@ public:
JsonValue(unsigned);
JsonValue(double);
JsonValue(bool);
JsonValue(const char*);
JsonValue(const String&);
JsonValue(const JsonArray&);
JsonValue(const JsonObject&);