The %ToJSON() method of the %DynamicAbstractObject classes in the ObjectScript languageshould never generate NaN without quotation marks. Although a %DynamicAbstractObject subclass can contain IEEE double-precision floating-point values including the special values Infinity and NaN, using %ToJSON on a %DynamicObject or a %DynamicArray that contains such special values will result in an <ILLEGAL VALUE> error signal since the JSON standard does not support such special IEEE floating-point values. It is possible some applications have extended the JSON standard to include NaN and Infinity as numeric values without quotation marks, the ObjectScript %ToJSON method does not support such an extension. However, @Julius Kavay did give an example how the ObjectScript ZWRITE command will display a %DynamicObject entry containing an IEEE NaN value.
- Log in to post comments