Reputation: 73
The first reason that pops up in the mind is backward capability. But maybe much more significant reasons exist?
Upvotes: 0
Views: 78
Reputation: 246493
json
has its uses:
it has less processing overhead when you store and retrieve the whole column, because it is stored as plain text and doesn't have to be parsed and converted to the internal binary representation.
it conserves the formatting and attribute order.
it does not remove duplicate attributes.
In short, json
is better if you don't want to process the column inside the database, that is, when the column is just used to store application data.
If you want to process the JSON inside the database, jsonb
is better.
Upvotes: 3