Code Monkey home page Code Monkey logo

Comments (8)

PatrickvL avatar PatrickvL commented on June 26, 2024

If you're taking the trouble to report an issue, at least supply all relevant details. (And a small fully contained reproduction scenario)

from jsondataobjects.

ahausladen avatar ahausladen commented on June 26, 2024

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:

  • USE_LAST_NAME_STRING_LITERAL_CACHE
  • USE_FAST_STRASG_FOR_INTERNAL_STRINGS

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.

from jsondataobjects.

iamnewaplayer avatar iamnewaplayer commented on June 26, 2024

i try it,but do not work;
i have only one line use this

UserItem.Custom['GCV'+nAbilSite.ToString+'_A']:=nValue.ToString;

property Custom[const v: string]: String read GetStringValue write SetStringValue;
procedure TUserItem.SetStringValue(const v: string; Value: string);
begin
if v.Length>0 then
Values.O['Custom'].S[v] := Value;
end;

some time
UserItem.values.tojson has this error;
maybe key empty
maybe like _GCV_0d\u0000

i assign this Custom Value only this one line.

from jsondataobjects.

iamnewaplayer avatar iamnewaplayer commented on June 26, 2024

some places
i used
useritem.values = useritem.values.clone

from jsondataobjects.

iamnewaplayer avatar iamnewaplayer commented on June 26, 2024

like this

HumData.O['BagItems'].O[i.ToString] :=
pTUserItem(m_ItemList.Items[i]).Values.Clone;

from jsondataobjects.

iamnewaplayer avatar iamnewaplayer commented on June 26, 2024

i used delphi 11.0

from jsondataobjects.

fastbike avatar fastbike commented on June 26, 2024

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.

from jsondataobjects.

iamnewaplayer avatar iamnewaplayer commented on June 26, 2024

can't reproduces the bug by myself..
it is occur in production environment

from jsondataobjects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.