C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Classes | Functions
web::json Namespace Reference

Library for parsing and serializing JSON values to and from C++ types. More...

Classes

class  array
 A JSON array represented as a C++ class. More...
 
class  json_exception
 A single exception type to represent errors in parsing, converting, and accessing elements of JSON values. More...
 
class  number
 A JSON number represented as a C++ class. More...
 
class  object
 A JSON object represented as a C++ class. More...
 
class  value
 A JSON value represented as a C++ class. More...
 

Functions

void _ASYNCRTIMP __cdecl keep_object_element_order (bool keep_order)
 Preserve the order of the name/value pairs when parsing a JSON object. The default is false, which can yield better performance. More...
 
_ASYNCRTIMP utility::ostream_t &__cdecl operator<< (utility::ostream_t &os, const json::value &val)
 A standard std::ostream operator to facilitate writing JSON values to streams. More...
 
_ASYNCRTIMP utility::istream_t &__cdecl operator>> (utility::istream_t &is, json::value &val)
 A standard std::istream operator to facilitate reading JSON values from streams. More...
 

Detailed Description

Library for parsing and serializing JSON values to and from C++ types.

Function Documentation

void _ASYNCRTIMP __cdecl web::json::keep_object_element_order ( bool  keep_order)

Preserve the order of the name/value pairs when parsing a JSON object. The default is false, which can yield better performance.

Parameters
keep_ordertrue if ordering should be preserved when parsing, false otherwise.

Note this is a global setting and affects all JSON parsing done.

_ASYNCRTIMP utility::ostream_t& __cdecl web::json::operator<< ( utility::ostream_t &  os,
const json::value val 
)

A standard std::ostream operator to facilitate writing JSON values to streams.

Parameters
osThe output stream to write the JSON value to.
valThe JSON value to be written to the stream.
Returns
The output stream object
_ASYNCRTIMP utility::istream_t& __cdecl web::json::operator>> ( utility::istream_t &  is,
json::value val 
)

A standard std::istream operator to facilitate reading JSON values from streams.

Parameters
isThe input stream to read the JSON value from.
valThe JSON value object read from the stream.
Returns
The input stream object.