According to the specification section 9.1.2:
STR: STR(BOOL|STR|INT|FLT: value) = MUST convert value to a STR. For BOOL, the result MUST be TRUE or FALSE. For INT and FLT, the result MUST be the base-prefixed numeric spelling, except that INF, -INF, and NaN render without a prefix. For STR, the result MUST be a copy.
In the implementation, however, STR converts MAP, TNS, FUNC, and THR values to STR, instead of failing.
According to the specification section 9.1.2:
In the implementation, however,
STRconvertsMAP,TNS,FUNC, andTHRvalues toSTR, instead of failing.