Skip to content

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

Description

@yoro3000

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions