Closed laoqiuqiu closed 6 years ago
JsonDataObjects can parse this without a problem. Did you use the latest version?
Is the string too long truncated?
st := TStringStream.Create('', TEncoding.UTF8);
hc := THTTPClient.Create;
hc.Get(a+b, st);
mmoLog.Clear;
mmoLog.Lines.Append(st.DataString);
JO := TJsonObject.Create;
try
JO.LoadFromStream(st, TEncoding.UTF8);
mmoLog.Lines.Append('=======================');
mmolog.Lines.Append(JO.ToJSON);
mmoLog.Lines.Append('=======================');
finally
JO.Free;
hc.Free;
st.Free;
end;
I was using tstringstream, and the same mistake occurred.
My mistake. I was wrong to use Tjsonobject to parse Tjsonarray.