-Infinity values are not handled correctly in JSON
A user found that when using UnflattenFromJSON for double arrays, if the JSON string encounters -Infinity then:
- The node errors with code -375011
- The node returns an array with partially parsed results
See forum: https://forums.ni.com/t5/G-Web-Development-Software/Bug-on-Unflatten-from-JSON/m-p/4361814#M702
Didn't thoroughly debug but scanning source the following line looks suspicious which seems to indicate that any negative value will not be treated like Infinity:
https://github.com/ni/VireoSDK/blob/673eb0dea01418f6ca20e6a2a53528a941eef7ca/source/core/TDCodecVia.cpp#L1207-L1207
Agreed, it looks like that line will cause a -Inf to be treated as if it was an overflow a few lines below and return an error.
Created two AzDo bugs for the issue:
- Lack of support for -Infinity
- Returning partial / incorrect results on error (effectively user data corruption on error)