diff --git a/deps/first/JSON/include/JSON/Common.hpp b/deps/first/JSON/include/JSON/Common.hpp index f0aaf684f..ee6040aec 100644 --- a/deps/first/JSON/include/JSON/Common.hpp +++ b/deps/first/JSON/include/JSON/Common.hpp @@ -16,6 +16,8 @@ #endif #endif +#define JSON_DEPRECATED [[deprecated("JSON Module deprecated and may be removed in next release. Please migrate to Glz.")]] + #include #include diff --git a/deps/first/JSON/include/JSON/Object.hpp b/deps/first/JSON/include/JSON/Object.hpp index 9e8e92e36..25cb344ad 100644 --- a/deps/first/JSON/include/JSON/Object.hpp +++ b/deps/first/JSON/include/JSON/Object.hpp @@ -42,29 +42,29 @@ namespace RC::JSON auto operator=(const Object&) -> Object& = delete; private: - auto find_value_by_key(const StringType& key) const -> Value*; - auto find_value_by_key(const StringType& key) -> Value*; + JSON_DEPRECATED auto find_value_by_key(const StringType& key) const -> Value*; + JSON_DEPRECATED auto find_value_by_key(const StringType& key) -> Value*; public: - auto new_object(StringType name) -> Object&; - auto new_array(StringType name) -> class Array&; - auto new_string(StringType name, const StringType& value) -> void; - auto new_null(StringType name) -> void; - auto new_bool(StringType name, bool value) -> void; + JSON_DEPRECATED auto new_object(StringType name) -> Object&; + JSON_DEPRECATED auto new_array(StringType name) -> class Array&; + JSON_DEPRECATED auto new_string(StringType name, const StringType& value) -> void; + JSON_DEPRECATED auto new_null(StringType name) -> void; + JSON_DEPRECATED auto new_bool(StringType name, bool value) -> void; - auto add_object(StringType name, std::unique_ptr) -> void; + JSON_DEPRECATED auto add_object(StringType name, std::unique_ptr) -> void; - auto get() -> decltype(m_members)& + JSON_DEPRECATED auto get() -> decltype(m_members)& { return m_members; }; - auto get() const -> const decltype(m_members)& + JSON_DEPRECATED auto get() const -> const decltype(m_members)& { return m_members; }; template - auto get(const StringType& key) const -> ValueType& + JSON_DEPRECATED auto get(const StringType& key) const -> ValueType& { auto value = find_value_by_key(key); if (!value) @@ -75,7 +75,7 @@ namespace RC::JSON } template - auto get(const StringType& key) -> ValueType& + JSON_DEPRECATED auto get(const StringType& key) -> ValueType& { auto value = find_value_by_key(key); if (!value) @@ -86,13 +86,13 @@ namespace RC::JSON } template - auto new_number(StringType name, number_type value) -> void + JSON_DEPRECATED auto new_number(StringType name, number_type value) -> void { m_members.emplace(std::move(name), std::make_unique(value)); } - auto serialize(ShouldFormat should_format = ShouldFormat::No, int32_t* indent_level = nullptr) -> StringType override; - auto get_type() const -> Type override + JSON_DEPRECATED auto serialize(ShouldFormat should_format = ShouldFormat::No, int32_t* indent_level = nullptr) -> StringType override; + JSON_DEPRECATED auto get_type() const -> Type override { return Type::Object; } diff --git a/deps/first/JSON/include/JSON/String.hpp b/deps/first/JSON/include/JSON/String.hpp index c3edc1fd9..da6dc0716 100644 --- a/deps/first/JSON/include/JSON/String.hpp +++ b/deps/first/JSON/include/JSON/String.hpp @@ -32,8 +32,8 @@ namespace RC::JSON } public: - RC_JSON_API auto serialize(ShouldFormat should_format = ShouldFormat::No, int32_t* indent_level = nullptr) -> StringType override; - RC_JSON_API auto get_type() const -> Type override + RC_JSON_API JSON_DEPRECATED auto serialize(ShouldFormat should_format = ShouldFormat::No, int32_t* indent_level = nullptr) -> StringType override; + RC_JSON_API JSON_DEPRECATED auto get_type() const -> Type override { return Type::String; } diff --git a/deps/first/JSON/include/JSON/Value.hpp b/deps/first/JSON/include/JSON/Value.hpp index 5914d163f..2e57110dc 100644 --- a/deps/first/JSON/include/JSON/Value.hpp +++ b/deps/first/JSON/include/JSON/Value.hpp @@ -17,7 +17,7 @@ namespace RC::JSON Bool, }; - inline auto type_to_string(Type type) -> std::string + JSON_DEPRECATED inline auto type_to_string(Type type) -> std::string { switch (type) { diff --git a/deps/first/JSON/src/Array.cpp b/deps/first/JSON/src/Array.cpp index 0f02e46f9..337b394b6 100644 --- a/deps/first/JSON/src/Array.cpp +++ b/deps/first/JSON/src/Array.cpp @@ -16,7 +16,7 @@ namespace RC::JSON return static_cast(*m_members.emplace_back(std::make_unique())); } - auto Array::new_string(const StringType& value) -> void + JSON_DEPRECATED auto Array::new_string(const StringType& value) -> void { m_members.emplace_back(std::make_unique(value)); }