diff --git a/tiny_gltf.h b/tiny_gltf.h index 49c313b..b8b6c9a 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -6274,6 +6274,13 @@ static void SerializeNumberProperty(const std::string &key, T number, JsonAddMember(obj, key.c_str(), json(number)); } +#ifdef TINYGLTF_USE_RAPIDJSON +template <> +void SerializeNumberProperty(const std::string &key, size_t number, json &obj) { + JsonAddMember(obj, key.c_str(), json(static_cast(number))); +} +#endif + template static void SerializeNumberArrayProperty(const std::string &key, const std::vector &value,