Compartir a través de


value::operator Operator

Access a field of a JSON object.

_ASYNCRTIMP value & operator [] (
   const utility::string_t &key
);

_ASYNCRTIMP const value & operator [] (
   const utility::string_t &key
) const;

_ASYNCRTIMP value & operator [] (
   size_t index
);

_ASYNCRTIMP const value & operator [] (
   size_t index
) const;

Parameters

  • key
    The name of the field

  • index
    The index of an element in the JSON array.

Return Value

A reference to the value kept in the field

Requirements

Header: json.h

Namespace: web::json

See Also

Reference

value Class