matortheeternal / argo Goto Github PK
View Code? Open in Web Editor NEWA JSON framework for Delphi. Allows you to create, edit, serialize, and deserialize JSON objects.
License: MIT License
A JSON framework for Delphi. Allows you to create, edit, serialize, and deserialize JSON objects.
License: MIT License
Adding a binary tree which maps keys to indices should greatly improve access performance without compromising other functionality.
Per JSON schema.
Hello,
Thank you for providing this library!
Would StringBuilder be used instead of string concatenation to enhance ToString & Escape performance at Value, Array and Object levels?
function ParseJSONString(var P: PWideChar): String;
function TJSONObject.ToString: String;
var
i: Integer;
begin
Result := '{';
for i := 0 to Pred(_Keys.Count) do
Result := Result + '"' + Escape(_Keys.Strings[i]) + '":' +
TJSONValue(_Values[i]).ToString + ',';
if _Keys.Count > 0 then
SetLength(Result, Length(Result) - 1);
Result := Result + '}';
end;
function Escape(s: String): String;
var
P: PWideChar;
c: WideChar;
begin
P := PWideChar(s);
Result := '';
while true do begin
c := P^;
Inc(P);
if c = #0 then
break
else if CharInSet(c, [#1..#31, '"', '\', #127]) then
Result := Result + AsciiEscape(c)
else if c > #255 then
Result := Result + UnicodeEscape(c)
else
Result := Result + c;
end;
end;
function TJSONArray.ToString: string;
var
i: Integer;
begin
Result := '[';
for i := 0 to Pred(_Values.Count) do
Result := Result + TJSONValue(_Values[i]).ToString + ',';
if _Values.Count > 0 then
SetLength(Result, Length(Result) - 1);
Result := Result + ']';
end;
Best regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.