1c5f01b2fSopenharmony_ci# <small>nlohmann::json_sax::</small>key 2c5f01b2fSopenharmony_ci 3c5f01b2fSopenharmony_ci```cpp 4c5f01b2fSopenharmony_civirtual bool key(string_t& val) = 0; 5c5f01b2fSopenharmony_ci``` 6c5f01b2fSopenharmony_ci 7c5f01b2fSopenharmony_ciAn object key was read. 8c5f01b2fSopenharmony_ci 9c5f01b2fSopenharmony_ci## Parameters 10c5f01b2fSopenharmony_ci 11c5f01b2fSopenharmony_ci`val` (in) 12c5f01b2fSopenharmony_ci: object key 13c5f01b2fSopenharmony_ci 14c5f01b2fSopenharmony_ci## Return value 15c5f01b2fSopenharmony_ci 16c5f01b2fSopenharmony_ciWhether parsing should proceed. 17c5f01b2fSopenharmony_ci 18c5f01b2fSopenharmony_ci## Notes 19c5f01b2fSopenharmony_ci 20c5f01b2fSopenharmony_ciIt is safe to move the passed object key value. 21c5f01b2fSopenharmony_ci 22c5f01b2fSopenharmony_ci## Examples 23c5f01b2fSopenharmony_ci 24c5f01b2fSopenharmony_ci??? example 25c5f01b2fSopenharmony_ci 26c5f01b2fSopenharmony_ci The example below shows how the SAX interface is used. 27c5f01b2fSopenharmony_ci 28c5f01b2fSopenharmony_ci ```cpp 29c5f01b2fSopenharmony_ci --8<-- "examples/sax_parse.cpp" 30c5f01b2fSopenharmony_ci ``` 31c5f01b2fSopenharmony_ci 32c5f01b2fSopenharmony_ci Output: 33c5f01b2fSopenharmony_ci 34c5f01b2fSopenharmony_ci ```json 35c5f01b2fSopenharmony_ci --8<-- "examples/sax_parse.output" 36c5f01b2fSopenharmony_ci ``` 37c5f01b2fSopenharmony_ci 38c5f01b2fSopenharmony_ci## Version history 39c5f01b2fSopenharmony_ci 40c5f01b2fSopenharmony_ci- Added in version 3.2.0. 41