Jump to content
Uwe Raabe

REST-JSon-Helpers got an update

Recommended Posts

REST-JSon-Helpers unit got an update. The unit contains the sources described in my articles Serializing Objects with TJson and Serializing Generic Object Lists with TJson.

 

While the previous version as described in the article was based on declaring a new interceptor class given to the attribute, the current implementation doesn't need that interceptor, but derives from the (now generic) attribute.

 

The new implementation allows to decorate the derived list class directly removing the need to decorate each field with that attribute.

 

In addition the new approach is able to convert a list instance directly into a Json array with out the need of a wrapper class. Also supported is reverting a Json array into a TArray<T>, which can easily be added to a corresponding list.

  • Like 1
  • Thanks 1

Share this post


Link to post

Nice, i have my own helpers class, but with a lib like this it would be nice if you get set defaults, like global or on classlevel.

So you would not have to decorate each TDateTime, or TStrings. 

just a tip! 

 

 

Edited by mvanrijnen

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×