Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json.Stringify in DXE7 not working ? #11

Open
Dinosane2 opened this issue Feb 1, 2021 · 2 comments
Open

Json.Stringify in DXE7 not working ? #11

Dinosane2 opened this issue Feb 1, 2021 · 2 comments

Comments

@Dinosane2
Copy link

Dinosane2 commented Feb 1, 2021

Json := TJson.Create();
Json['field6'].AsString := 'hello world';
writeln(Json.Stringify());

This simple code should produce a string

{"field6" : "hello world"}

??

If so it is not what is happening using Delphi XE7. An empty string is the result.

@carloshendrik
Copy link

fiz isso no Delphi 11 e a função Json.Stringify retornou vazio

@lamici
Copy link

lamici commented Jun 15, 2023

I had the same problem. I solved it by creating an "override" of the stringify method in TJsonObject and TJsonArray. I'll attach the code below since I don't have the availability to create a pull request.

Jsons.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants