#1 2018-09-03 14:40:13

ComingNine
Member
Registered: 2010-07-29
Posts: 294

Float in a variant field of TSQLRecord becomes string when got back fr

As shown in the gist, I am trying to store a float field into a variant field of a TSQLRecord. When the Variant field is assigned by calling ObjectToJSON, it has the correct internals.

   {"Val":1234.56789} 

Furthermore, the DB file has the correct float internals.

However, when the TSQLRecord is retrieved back from DB, its variant field contains string-based internals. As a result, the float field cannot be parsed back by calling ObjectLoadJSON.

   {"Val":"1234.56789"} 

Could you help to comment whether it is possible to prevent the transformation of the float internal into string internal ?

Last edited by ComingNine (2018-09-03 17:00:40)

Offline

Board footer

Powered by FluxBB