array with mixed data types can't be deserialized with read_jmespath
I have this message:
[1,"a","b",{"c":1}]
I was trying to read the first 2 entries using this call:
std::tuple<int,std::string> target;
auto err = read_jmespath<"[0:1]">(target, buffer);
However, I get a syntax_error.
When I changed the first entry to become a string and deserialize that into a std::vector<std::string> the conversion was working. Also the deserialization of a single value works, just not the tuple.
In addition, I need to use this from inside a from<> specialization. Calling read_jmespath isn't ideal. Would it be possible to make the jmespath feature available directly from that context?
I need this because the JSON structure looks different, depending on the first array element.
thx Michi
Thanks for reporting. I'm currently occupied for a couple weeks, so I won't get to this immediately. But, I'll try to address this as soon as I'm able.
This should be implemented in #2081. Thanks for this request!