JsonbArray returns malformed result
I have a field that has jsonb[] type. I want to add multidimensional array data to that field. But PostgreSQL returns an error. I tried to find what is wrong but i couldn't succeed.
You can reproduce with that data:
[
[
'id'=>5,
'text'=>'test'
]
]
error:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: malformed array literal: "{{"id":5,"test":"test"}}"
DETAIL: Unexpected array element.
There is a start point for finding what is wrong: https://dba.stackexchange.com/questions/54283/how-to-turn-json-array-into-postgres-array/54289#54289
Oh, 🐟 !
The package employs json_encode and json_decode for the transformations and that seems not to be good enough for Postgres.
Can you please confirm when it happens and share complete code for reproducing it?
Hey @martin-georgiev , actually i can't remember when i got that error. But i'll try to reproduce and share complete code with you as soon as possible.
Closing due to no further reports of this breaking in later versions. Please reopen if you see it happening again.