General Casting Strings

Hi there

Viewing the source code, why are some strings cast as  UTF8ToString(RawByteString and other strings are not ie

Line 565 - Cast
      FEndAddress := UTF8ToString(RawByteString(GetJSONProp(jo,'end_address')));

Line 583 - Not Cast
        FDistanceText := GetJSONProp(ffo,'text');

Im just curious as I read through your source code.....

Sorry for my ignorance!!!




It is correct that the casting could have been done in a more consistent way.
In this case there is no UTF8ToString cast for FDistanceText because the value shouldn't contain any UTF8 encoded characters.