Closed aschegolskiy closed 5 years ago
Yes, #$A converted to newline for strings by the delphi compiler. But inside json string '#$A' is just unicode character sequence. I think that in diagram the control characters are: \n, \t \" etc. Are you agree with that?
You are right, in my example it is control character.
Following code rises Exception:
procedure TForm1.Button1Click(Sender: TObject); var jso: TJsonObject; begin jso := TJsonObject.Parse('{"ml_model": "J250'#$A'IMEI"}') as TJsonObject; jso.Free; end;
Project Project1.exe raised exception class EJsonParserException with message 'Invalid character in string (1, 19)'.
I checked that string complies with the JSON string specification.