I have a json file from which I read an array of objects.
Now I have situation where, if some object contains \n, then I have to do some extra operations. To check whether the objects contain \n, or not, I do the following...
String normalString = 'somethin \n and something';
String jsonString = jsonFileData['some_field'];
print(normalString.contains('\n')); //true
print(jsonString.contains('\n')); // false
If I do string.contains() with simple string it returns true, but if I check check the json file as a string false is returned.
Why is this so?