Subscribe to this list via RSS Blog posts tagged in Generics
How to get the array using the TJSONIterator Delphi[JAPAN]

In this case json. 

////
{"int_array":[5,10,15,20],"string_array":["日本語","한글","English"]}

To get an array, you can use TJSONArray.

I will introduce a case using an TJsonTextReader and TJSONIterator.

We will create methods using generics. 

It is because we want to support the Integer and String.

Object Pascal "Mind Your Language!" Dev Direct webinar source code The fourth season of Embarcadero EMEA "Developer Direct ONLINE!" webinars is half way! There are still three more episodes to go, 30 minutes every second Friday at 11am Amsterdam (10am UK) time. With every webinar we have more attendees and you can still register at embt.co/embtdd4 Today I had a...

Posted by on in Blogs
This is the last day… In this office. I’ve been in the same physical office for nearly 15 years. After years of accumulation, it now looks positively barren. Beginning next Monday, March 29th, 2010, I’ll be in a new building, new location, and new office. The good thing is that the new place is a mere...

Posted by on in Blogs
Comparing C#, C++, and Delphi (Win32) Generics C#, C++, and Delphi all have a generic type and method language feature. Although all three languages are statically typed, they implement generics in very different ways. I'm going to give a brief overview of the differences, both in terms of language features and implementation. I presume that Delphi Prism generics...
Delphi Prism and DataSnap Server Method Stream Parameters This post is about using Delphi Prism to pass streams to/from DataSnap server methods.  The sample client that goes along with this post is available here: http://cc.embarcadero.com/item/26874. This client has the same functionality as the Delphi client described in this post: DataSnap Server Method Stream Parameters.  Here is a screen shot...

Posted by on in Blogs
DataSnap Server Method Stream Parameters This is a continuation of my posts on DataSnap server method parameters and return types.  This post is about  TStream and TDBXStreamValue.    The sample client and server projects that go with this post can be downloaded here: http://cc.embarcadero.com/item/26854 See my earlier posts on “Basic” and “Basic DBXValue” types.   I’ve yet to...

Posted by on in Blogs
Call DataSnap Server Methods with Delphi Prism This post provides information about calling DataSnap server methods from Delphi Prism clients. There are two new samples that go along with this post: http://cc.embarcadero.com/item/26806 and http://cc.embarcadero.com/item/26805 The first sample is a Delphi Prism client that demonstrates "Basic" types.  This client has nearly the same functionality as the Delphi client described...

Posted by on in Blogs
DataSnap Server Method DBXValue Parameters This post provides more information about DataSnap server method parameters and return types. This is my second post on this subject, following DataSnap Server Method Parameters. The previous post was about "Basic" types. This post is about "Basic DBXValue" types.  The sample client and client and server projects that go with...

Posted by on in Blogs
DataSnap Server Methods Parameters Delphi 2009 introduced support for DataSnap server methods. If you are not familiar with this feature, here are two articles that describe server methods: DataSnap 2009 Overview , Getting Started with Delphi DataSnap 2009. DataSnap server methods support a variety of parameter and return types. The following list shows the types grouped...

Posted by on in Blogs
Generics, Commas, and Semicolons In Delphi 2009, you declare a generic type with multiple type parameters by separating the type parameters with a semicolon. If the type parameters have a constraint, you separate the constraint using a colon. Like this: type TFoo<TypeParam1; TypeParam2: ISomething> = class This means that TypeParam2 must support ISomething. In C#,...

Check out more tips and tricks in this development video: