Skip to content

nlohmann::adl_serializer<T,void>::to_json no matching overloaded function found #1641

Closed
@yoro3000

Description

I want to serialize a vector of a type I created. (ex: std::vector< RoomData >)

So I used the to_json function on the class RoomData:
Screenshot_61

And serialize it like that: (res.rooms is std::vector< RoomData >)
Screenshot_62

*Both are found on the same file (the to_json file at the top)

but I'm getting those errors:

  1. nlohmann::adl_serializer<T,void>::to_json no matching overloaded function found (File: json.hpp, line 1256)
  2. Failed to specialize function template 'unknown-type nlohmann::adl_serializer<T,void>::to_json(BasicJsonType &, ValueType &&) noexept()' (File: json.hpp, line 1256)

I'm using the latest version.

Any idea where is this coming from?

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions