You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what you tried.
I tried code below, and got confused what j.get() does or works, since there is no wiki on this repo
auto j=json::parse(json);
std::vector<float>positions;
positions=j["vertices"];
Describe which system (OS, compiler) you are using.
Ubuntu 18.04 LTS
$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Describe which version of the library you are using (release version, develop branch).
develop branch by just putting it into the project.
The text was updated successfully, but these errors were encountered:
Is it by design that get_to appends to the vector? Wondering since you are reserving in json.hpp like this: arr.reserve(j.size()); without considering the size the std::vector already has.
I want to get
std::vector
s from jsonI tried code below, and got confused what
j.get()
does or works, since there is no wiki on this repoUbuntu 18.04 LTS
develop branch by just putting it into the project.
The text was updated successfully, but these errors were encountered: