You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most primitives are successfully serializable into JSON columns, but boolean appears to be the exception.
awaitdb`CREATE TABLE foo(value JSON)`;for(constvalueof['string-value',123,true]){awaitdb`INSERT INTO foo (value) VALUES (${value})`;}// Result: PostgresError: column "value" is of type json but expression is of type boolean
The string and number values are successfully serialized with the JSON type converter, but the boolean is not.
Is it possible that the inferType method is preventing the boolean value from being treated as a JSON value?
Unfortunately I don't understand the type handling code well enough to offer a solution.
Any help is much appreciated! 🙏
The text was updated successfully, but these errors were encountered:
Most primitives are successfully serializable into JSON columns, but
boolean
appears to be the exception.The
string
andnumber
values are successfully serialized with the JSON type converter, but theboolean
is not.Is it possible that the inferType method is preventing the boolean value from being treated as a JSON value?
Unfortunately I don't understand the type handling code well enough to offer a solution.
Any help is much appreciated! 🙏
The text was updated successfully, but these errors were encountered: