BloombergLP::baljsn::JsonTokenizer::toAscii

Return the string representation of the specified enumeration value.

Synopsis

Declared in <baljsn_jsontokenizer.h>

static
char const*
toAscii(TokenType value);

Description

If value matches an enumerator, return the corresponding non-modifiable string; otherwise return a unique (error) string. The string representation of value matches its corresponding enumerator name with the "e_" prefix elided. For example: ` bsl::cout << DstPolicy::toAscii(JsonTokenizer::e_ELEMENT_VALUE); ` will print the following on standard output: ` ELEMENT_VALUE ` Note that specifying a value that does not match any of the enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.

Return Value

the non-modifiable string representation of value

Parameters

NameDescription
valueenumeration value to convert