I have a VB.Net Webservice that returns data is a JSON string. Some of the data returned might have an EMOJI in it. When I return data that does not have an EMOJI in it the data come back fine.
Like this -
[
{
"ImgID": "150",
"ImgDesc": "Added to your portfolio",
"PublicID": "c0lbquvzitd3igohfh7x",
"ImgURL": "test.com",
"LikeCount": "0",
"CommentCnt": "2",
"PickCount": "",
"ServerUpdateDate": "1\/17\/2016 3:13:21 PM",
"UserName": "Deathstarspa",
"ProfileImgID": "hqhoiohfckzldgpdem6k",
"Location": "Chester County, PA, USA",
"dltflg": "False",
"PortName": "2 0 1 6 | M E N S",
"Categories": "Blowouts"
},
{
"ImgID": "151",
"ImgDesc": "Stone cold",
"PublicID": "udecff1bi0ymhewp1qlv",
"ImgURL": "Test.com",
"LikeCount": "0",
"CommentCnt": "0",
"PickCount": "",
"ServerUpdateDate": "1\/17\/2016 3:17:26 PM",
"UserName": "Deathstarspa",
"ProfileImgID": "hqhoiohfckzldgpdem6k",
"Location": "Chester County, PA, USA",
"dltflg": "False",
"PortName": "2 0 1 6 | M E N S",
"Categories": "Test"
}
]
If the data has an emoji anywhere in the sting the string gets cutoff at the very end.
It does not matter where the emoji is in the data.
Like -
[
{
"ImgID": "161",
"ImgDesc": "Bed ?????",
"PublicID": "gnw6ooo04ls21kqq8doo",
"ImgURL": "test.com",
"LikeCount": "0",
"CommentCnt": "0",
"PickCount": "",
"ServerUpdateDate": "2\/11\/2016 8:18:03 PM",
"UserName": "Deathstarspa",
"ProfileImgID": "hqhoiohfckzldgpdem6k",
"Location": "Chester County, PA, USA",
"dltflg": "False",
"PortName": "Bed Pics",
"Categories": "Blowouts,Treatments"
},
{
"ImgID": "162",
"ImgDesc": "Bed ?????",
"PublicID": "lrdxpvwxoq5zxpkagamo",
"ImgURL": "test.com",
"LikeCount": "0",
"CommentCnt": "0",
"PickCount": "",
"ServerUpdateDate": "2\/11\/2016 8:18:05 PM",
"UserName": "Deathstarspa",
"ProfileImgID": "hqhoiohfckzldgpdem6k",
"Location": "Chester County, PA, USA",
"dltflg": "False",
"PortName": "Test Pics"
Although you cannot see the Emojis in the ImgDesc piece the ?????
represent the emoji. So the record with ImgID 161
is complete, but the record with ImgID
of 162
get cutoff at "Test Pics,"
. If I remove the emoji from the ImgDesc then the data come back fine.
I am working with VB.NET
and I have the Newtonsoft.Json dll
referenced.
Is there something I need to do so the emojis do not cause issues?