HI I've a problem with special character like & in a json, assuming I want to make a json with a field description that contains an & character, the db2 doesn't escaped automatically forbidden character automatically?
I put an & into field description of table act.
then with this select I have a simple select:
the result is:
But this is not a valid json. Is there any special keyword to escape this character automatically?
Many thanks!
I put an & into field description of table act.
Code:
Update Sample/Act Set Actdesc = 'MANAGE&ADVISE' Where Actkwd = 'MANAGE';
Code:
Select json_object('key' : actkwd, 'description' : Actdesc) form From Sample/act where Actkwd = 'MANAGE';
Code:
{"key":"MANAGE","description":"MANAGE&ADVISE"}
Many thanks!
Comment