Hi Hackers,
Attached is the patch to fix data alterations done in pgAdmin4 for json datatype. pgAdmin4 will not change json data in any way, and will treat json data as text for data type json. Note that, this is not applicable for jsonb.
Also added jsonb editing validation.
An enhancement which I have added with this patch is when you do double click on the slick grid column resize bar, the column will expand to maximum width of data.
Below is sample data for testing:
CREATE TABLE public.tab_jsontest
(
id integer NOT NULL PRIMARY KEY,
coljson json,
coljsonarr json[],
coljsonb jsonb,
coljsonbarr jsonb[]
)
insert into tab_jsontest values(1,'{"sender":"pablo","body":"they are on to us"}','{"{\"sody\": \"they are on to us\", \"bender\": \"pablo\"}","{\"sender\": \"arthur\"}"}','{"sender":"pablo","body":"they are on to us"}','{"{\"body\": \"they are on to us\", \"sender\": \"pablo\"}","{\"sender\": \"arthur\"}"}')
Kindly review.
--
Thanks and Regards,Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"