KItinerary

json/jsonld.h
1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KITINERARY_JSONLD_H
7#define KITINERARY_JSONLD_H
8
9class QJsonObject;
10class QString;
11class QStringView;
12
13namespace KItinerary {
14
15/** Utility methods for working with schema.org data in JSON-LD format. */
16namespace JsonLd
17{
18 /** Normalized type name from @p object. */
19 [[nodiscard]] QString typeName(const QJsonObject &obj);
20 [[nodiscard]] QString normalizeTypeName(QString &&typeName);
21
22 /** Checks whether @p uri is in the http://schema.org namespace.
23 * That is more complex than just startsWith since schema.org started
24 * to use "https" in their URIs...
25 */
26 [[nodiscard]] bool isSchemaOrgNamespace(QStringView uri);
27};
28
29}
30
31#endif // KITINERARY_JSONLD_H
QString typeName(const QJsonObject &obj)
Normalized type name from object.
bool isSchemaOrgNamespace(QStringView uri)
Checks whether uri is in the http://schema.org namespace.
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.