summaryrefslogtreecommitdiffhomepage
path: root/serialize/string.hpp
blob: 66e448a4a5478d61771bc388d39f5670e03aa20c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <nlohmann/json_fwd.hpp>

namespace Corrade::Containers {

template<typename T> class BasicStringView;
class String;
using StringView = BasicStringView<const char>;

} // namespace Corrade::Containers

namespace nlohmann {

template<>
struct adl_serializer<Corrade::Containers::String> {
    static void to_json(json& j, const Corrade::Containers::String& val);
    static void from_json(const json& j, Corrade::Containers::String& val);
};

template<>
struct adl_serializer<Corrade::Containers::StringView> {
    static void to_json(json& j, const Corrade::Containers::StringView& val);
    static void from_json(const json& j, Corrade::Containers::StringView& val);
};

} // namespace nlohmann