File indexing completed on 2024-04-21 04:41:26

0001 /*
0002     SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef KPUBLICTRANSPORT_JSONP_H
0007 #define KPUBLICTRANSPORT_JSONP_H
0008 
0009 #include "kpublictransport_export.h"
0010 
0011 class QByteArray;
0012 
0013 namespace KPublicTransport {
0014 
0015 /** Decode JSON-P wrapped JSON data.
0016  *  Also works for regular JSON, ie. this is safe to use unconditionally.
0017  *  @see https://en.wikipedia.org/wiki/JSONP
0018  *  @internal exported for onboard API and testing
0019  */
0020 namespace JsonP
0021 {
0022     KPUBLICTRANSPORT_EXPORT QByteArray decode(const QByteArray &data);
0023 };
0024 
0025 }
0026 
0027 #endif // KPUBLICTRANSPORT_JSONP_H