KItinerary::JsonLd
Functions | |
template<typename T > | |
bool | canConvert (const QVariant &value) |
template<typename T > | |
T | convert (const QVariant &value) |
template<typename T > | |
bool | isA (const QVariant &value) |
void | renameProperty (QJsonObject &obj, const char *oldName, const char *newName) |
QString | typeName (const QJsonObject &obj) |
bool | valueIsNull (const QVariant &v) |
Detailed Description
JSON-LD data type helper functions.
Utility methods for working with schema.org data in JSON-LD format.
Function Documentation
◆ canConvert()
|
inline |
Checks if the given value can be up-cast to T
.
Definition at line 31 of file datatypes.h.
◆ convert()
|
inline |
Up-cast value
to T
.
- Note
- This does not perform any safety checks!
- See also
- canConvert
Definition at line 47 of file datatypes.h.
◆ isA()
|
inline |
Returns true
if value
is of type T
.
Definition at line 24 of file datatypes.h.
◆ renameProperty()
void KItinerary::JsonLd::renameProperty | ( | QJsonObject & | obj, |
const char * | oldName, | ||
const char * | newName | ||
) |
Rename a property, if present and the new name isn't in use already.
Definition at line 17 of file jsonldfilterengine.cpp.
◆ typeName()
QString KItinerary::JsonLd::typeName | ( | const QJsonObject & | obj | ) |
Normalized type name from object
.
Definition at line 12 of file json/jsonld.cpp.
◆ valueIsNull()
bool KItinerary::JsonLd::valueIsNull | ( | const QVariant & | v | ) |
Checks whether v
holds a null-like value.
This is similar to QVariant::isNull in Qt5, but differs from the "shallow" QVariant::isNull in Qt6 which doesn't check the content at all.
Definition at line 344 of file jsonlddocument.cpp.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:55:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.