cancel
Showing results for 
Search instead for 
Did you mean: 

How to escape character from impex?

Former Member
0 Kudos
6,784

Hi All,

Could someone help me how to escape characters like comma,semicolon,colon,backslash etc ?

Thanks, G Gopinath.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member620692
Active Contributor
0 Kudos

You do not need to escape : or , or backslash e.g. the following ImpEx will pass for all the records mentioned below:

 $productCatalog=Default
 $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
 
 INSERT_UPDATE Product;code[unique=true];$catalogVersion
 ;myCode:myID;
 ;myCode,myID;
 ;myCode\myID;

For escaping smicolon( ; ), you need to put it inside double quotes e.g.

 $productCatalog=Default
 $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
 
 INSERT_UPDATE Product;code[unique=true];$catalogVersion
 ;"myCode;myID";

In addition to these characters, you can escape ' and " by doubling them. Please check https://wiki.hybris.com/display/release5/ImpEx+Syntax for more information.

Former Member
0 Kudos

Hi ,

I am getting data from json response like the below:

 "AddressLine1": "7602, \"CHAMUNDA ESTATE\",",
 "AddressLine2": "Nr. Ramol Cross Roads, G.I.D.C., Phase-I",

May know how to escape them?

Thanks, G Gopinath.

former_member620692
Active Contributor
0 Kudos

Can you please write it in the ImpEx format? e.g.

 INSERT_UPDATE item-type;code[unique=true];attribute
 1234;data-for-attribute