Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Creating a JSON array with objects

$
0
0
Does that compile? I'm surprised that the make_pair() call does the right conversion, but C++ can be magical sometimes... :-)

Try this, too:
json::value polygon;

for (int i = 0; i < 10; ++i)
{
    polygon[i] = json::value::number(i);
}
Generally, if you find that there are things not covered by the documentation, the unit tests available in the source code tree are often a good resource to rely on.

Niklas

Viewing all articles
Browse latest Browse all 4845

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>