Bug #796
JSON functions used in Enduro/X might incorrectly process large long fields
Status: | Closed | Start date: | 02/09/2023 | |
---|---|---|---|---|
Priority: | Normal (Code 4) | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - |
Description
For example:
Having "109832567849012365" in UBF long field, and converting buffer tpubftojson()->tpjsontoub() the value will be changed from "109832567849012365" to "109832567849012368"
History
#1 Updated by Madars about 1 year ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Release notes¶
Fixed JSON library so that tpjsontoubf(), tpubftojson(), tpviewtojson(), tpjsontoview() and related auto buffer convert functions would handle C long type correctly. Now long types are directly marshaled/unmarshaled from JSON. Previously such conversions was done via double type, which at large numbers caused long typed fields to change the values.
Compatibility changes: tpviewtojson() previously did encode int type fields to JSON strings, now int type fields in views are encoded as JSON number.
Available from Enduro/X release 7.5.38+, 8.0.8+.
#2 Updated by Madars about 1 year ago
- Status changed from Resolved to Closed