R
R
Rastishka2015-04-01 11:57:12
PHP
Rastishka, 2015-04-01 11:57:12

What is the correct way to work with JSON fields in Postgresql?

How to work with JSON (and array) fields in PHP?
A query to the database returns me just a string of the form {'bla':'bla'}, which I need to decode / encode every time, which seems wrong to me.
For myself, I wrote an Active record type bike through PDO, which itself deals with decoding / encoding in JSON.
But can you do something better?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2015-04-01
@Rastishka

What do you mean by "work"? Since 9.3 this is available: www.postgresql.org/docs/9.3/static/functions-json.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question