Describe what you want to achieve.
I want to parse a json file from the web, downloaded into a string using libcurl, back into a json object.
Describe what you tried.
Image of code
This is what I've tried - the former cout prints the string that curl downloaded, which is in the correct order of the original json on the webserver. The second cout simply posts the same json but as a json object, which has been parsed by nlohmann::json. As you can see, it is completely jumbled up. When trying to access a nested part of the json, for example ["teams"]["players"] it returns null and crashes with error 305, cannot use operator[] with a string argument. If you need any more information please don't hesitate to reply.
Describe which system (OS, compiler) you are using.
VS2015 (v140) on Windows 10
Describe which version of the library you are using (release version, develop branch).
release
This is known: https://github.com/nlohmann/json#order-of-object-keys
Ok thanks, but does this solve how to access nested Json elements? or is that something unrelated?
for example I want to access these parts, but it returns null with error 305

Does j["teams"][0]["players"][0]["name"] work?
Yes, that works a charm! Thanks so much! This may seem like a silly question, but what does the [0] actually do there? Thanks again.
It accesses the first element of an array, just like for a std::vector.
To be fixed with #2258.
Most helpful comment
It accesses the first element of an array, just like for a
std::vector.