5
Answers

Trim leading and trailing space from Json string

Umesh Kumar

Umesh Kumar

6y
5.2k
1
I have a json string like below
 
{"customerCode":xxx,"shippingAmount":9.0,"shippingMethod":" Ground  ","customerAddress":{"line1":" 1595 Spring Hill rd ","line2":"ste  
 
I want to trim the leading space and trailing space in the json string. I used regex but doesn't seems to be working. 
Answers (5)