KItinerary::JsonLd

KItinerary::JsonLd Namespace Reference

Functions

template<typename T >
bool canConvert (const QVariant &value)
 
template<typename 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()

template<typename T >
bool KItinerary::JsonLd::canConvert ( const QVariant value)
inline

Checks if the given value can be up-cast to T.

Definition at line 31 of file datatypes.h.

◆ convert()

template<typename T >
T KItinerary::JsonLd::convert ( const QVariant value)
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()

template<typename T >
bool KItinerary::JsonLd::isA ( const QVariant value)
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.

This file is part of the KDE documentation.
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.