<div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Dec 20, 2018 at 1:09 PM Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Thu, 20 Dec 2018, silvioprog wrote:<br>
> ... a pascal-ish manner, should be:<br>
><br>
> var<br>
> o: TJSObject;<br>
> begin<br>
> o := TJSObject.new([<br>
> 'foo', 'bar',<br>
> 'object', TJSObject.new(['abc', 123]),<br>
> 'array', TJSArray.new(1,2,3)<br>
> ]);<br>
> Writeln(TJSJSON.stringify(o));<br>
> end.<br>
<br>
I agree. When we have type helpers, this will be possible.</blockquote></div><div><br></div><div><div>Great! :-)</div><div><br></div><div>The parametrized constructor is already possible in TJSArray.new(), on each parameter is an array item, but it will be very useful something like this in TJSObject.new() too, on each item is a pair (key-value) and without the brackets. :-)</div></div><div></div><div><br></div>--<br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div></div></div>