Re: How to get value wrapped in json?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to get value wrapped in json?
Date: 2022-05-07 03:08:00
Message-ID: CAKFQuwbgPWjZF36aowa3dSP7FiFwL_nqU6dSd6aUkf9FoHNv2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, May 6, 2022, Shaozhong SHI <shishaozhong(at)gmail(dot)com> wrote:

> A json object is like this - {3}.
>
> How to get the value -3 out of this json object {3}
>
>
That isn’t valid json so your question doesn’t make sense.

Just treat it as a text type and use one or more of the documented text
functions to manipulate it.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Amit Kapila 2022-05-07 04:08:43 Re: Support logical replication of DDLs
Previous Message Tom Lane 2022-05-07 03:05:06 Re: "A transaction cannot be ended inside a block with exception handlers."