netheril96 / StaticJSON

Fast, direct and static typed parsing of JSON with C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for std::array

ng5 opened this issue · comments

Please can you confirm if it is possible to add support for std::array. it should have same semantics to iterator the list. (e.g. std::vector, std::list etc)

Yes. The original version has it, and the current version still has the ArrayLengthMismatchError. I removed it during rewrite because I thought no one actually had the need for it. I will add it back after my three month internship ends (in case of copyright issues).

My original design mandates that the JSON array has length N for a element declared in C++ as std::array<T, N>, or else an ArrayLengthMismatchError will be returned. Do you think that is what you need? Or a more lax parsing?

thank you so much for coming back. Yes, std::array<T,N> is exactly what i need. For now I'm using std::tuple because it is supported in your library. But ofcourse it is not a substitute for std::array.

Support added in 02f0f22

thank you, much obliged.