Open iamnewaplayer opened 2 years ago
If you're taking the trouble to report an issue, at least supply all relevant details. (And a small fully contained reproduction scenario)
I can't reproduce this with the following code:
procedure TestTJsonObject.TestIssue71;
var
Json: TJsonObject;
S: string;
begin
Json := TJsonObject.Parse('{ "_GCV_0_A": "24" }') as TJsonObject;
try
CheckEquals(
'{' + JsonSerializationConfig.LineBreak +
JsonSerializationConfig.IndentChar + '"_GCV_0_A": "24"' + JsonSerializationConfig.LineBreak +
'}' + JsonSerializationConfig.LineBreak, Json.ToJSON(False));
finally
Json.Free;
end;
end;
You could try to disable one or both of the following defines:
Maybe something is fishy with those optimizations, as the string seems to be modified. Or there is something else overwriting the memory outside of JsonDataObjects, that possibility always exists.
i assign this Custom Value only this one line.
some places i used useritem.values = useritem.values.clone
like this
HumData.O['BagItems'].O[i.ToString] := pTUserItem(m_ItemList.Items[i]).Values.Clone;
i used delphi 11.0
How about providing a project that reproduces the bug, so some others can test it for you. Leaving shouty comments on the ticket is of no use. Thanks.
can't reproduces the bug by myself.. it is occur in production environment
src "_GCV_0_A": "24", dst "_GCV_0d\u0000": "24",
I don't know what happened! i used JsonDataObjects.ToJson() to save to Mongo Sometimes this kind of error occurs some string end error whit key or value