|
@@ -633,6 +633,7 @@ procedure TJSONToPascal.MaybeEmitType;
|
|
begin
|
|
begin
|
|
if FinType then exit;
|
|
if FinType then exit;
|
|
Undent;
|
|
Undent;
|
|
|
|
+ AddLn('');
|
|
AddLn('Type');
|
|
AddLn('Type');
|
|
Indent;
|
|
Indent;
|
|
FinType:=True;
|
|
FinType:=True;
|
|
@@ -646,8 +647,6 @@ Var
|
|
IP : String;
|
|
IP : String;
|
|
|
|
|
|
begin
|
|
begin
|
|
- AddLn('');
|
|
|
|
- MaybeEmitType;
|
|
|
|
M:=FPropertyMap.FindPath(APath);
|
|
M:=FPropertyMap.FindPath(APath);
|
|
If M=Nil then
|
|
If M=Nil then
|
|
begin
|
|
begin
|
|
@@ -671,6 +670,7 @@ begin
|
|
IP:=AddToPath(M.Path,'[0]');
|
|
IP:=AddToPath(M.Path,'[0]');
|
|
GenerateDeclaration(IP,J.Items[0]);
|
|
GenerateDeclaration(IP,J.Items[0]);
|
|
MaybeEmitType;
|
|
MaybeEmitType;
|
|
|
|
+ Addln('');
|
|
GenerateArrayDeclaration(M,TJSONarray(J));
|
|
GenerateArrayDeclaration(M,TJSONarray(J));
|
|
end
|
|
end
|
|
else if J is TJSONObject then
|
|
else if J is TJSONObject then
|
|
@@ -682,6 +682,7 @@ begin
|
|
end;
|
|
end;
|
|
M.ParentTypeName:=GetDefaultParentName;
|
|
M.ParentTypeName:=GetDefaultParentName;
|
|
MaybeEmitType;
|
|
MaybeEmitType;
|
|
|
|
+ Addln('');
|
|
GenerateObjectDeclaration(M,TJSONObject(J));
|
|
GenerateObjectDeclaration(M,TJSONObject(J));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|