Json: unordered_map with vectors won't convert to json?

Created on 25 Jul 2018  路  2Comments  路  Source: nlohmann/json

I have a std::unordered_map<std::string, vector<float>> *valuesMap and am trying to nlohmann::json jstr(valuesMap); but I do get error

error: static assertion failed: could not find to_json() method in T's namespace static_assert(sizeof(BasicJsonType) == 0

Are vectors not supported?

question proposed fix

All 2 comments

Pointer conversion is not supported as-is, dereferencing valuesMap should work.

Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

afowles picture afowles  路  3Comments

CraigHutchinson picture CraigHutchinson  路  4Comments

asmaloney picture asmaloney  路  4Comments

jmlemetayer picture jmlemetayer  路  3Comments

qis picture qis  路  4Comments