Columns are being stringified at random
Hi everyone.
In my JSON response object , some numeric fields are being turned into strings, whereas otehr fileds are kept in their oiginal numeric format. Why? Is this a config problem? Can I do somethign about it? The schema is correctly typed, but when I fetch some fields get turned into text whereas others do not.
Thanks in advance for any help
!
For context, this is the fucntion:
For example, price is a number, but is being returned as a string. Personnel is a number and is being returned as a number.
I can't figure this out.
Solution:Jump to solution
What is the exact column type you're using for price?
-
numeric
and decimal
(exact precision) are input/output as a string
- real
and double precision
(variable precision) are input/output as numbers...2 Replies
Solution
What is the exact column type you're using for price?
-
numeric
and decimal
(exact precision) are input/output as a string
- real
and double precision
(variable precision) are input/output as numbers@Sillvva , Ah, I see the issue now. It's "integer" vs "numeric".
Thanks!