JSON
response String containing an apostrophe
This is the key and value coming from the server.
"name": "men’s basketball wear with free product",
When I'm converting this JSON
into pojo response
Future<Product>
returning me this when I print the string in the log.
PRODUCT NAME
menâs basketball wear with free product
I have tried this solution but nothing is happening
replaceAll("'", "\'").replaceAll('"', "\'")
replaceAll('"', '\\"')
I have tried in response class
Product.fromJsonMap(Map<String, dynamic> map):
pid = map["pid"],
aid = map["aid"],
name = map["name"].replaceAll("'", "\'");
My HTTP request
http.Response res = await http.get(url);