Jump to content
Stéphane Wierzbicki

Delphi-neon, any thought?

Recommended Posts

I started testing a few days ago and, despite the lack of unit tests, I think it's worth a look.  I've tried just about every other JSON serializer out there but have come up against at least one limitation in each of them for my uses cases (including unable to serialize records, nested classes, generic lists). On paper, Neon looks like it'll do everything I need - I've a query in with the author and will be able to answer definitively when he gets back.

  • Like 1

Share this post


Link to post

It handled a TList<TPoint> which I tested better than REST.Json - good.

Unfortunately it's based on System.JSON which makes it a no go for me.

 

What I like though is the architecture that enables encapsulating different collection types for serialization/deserialization - I just wished it would not require RTTI for builtin RTL collection types.

From a quick look though extending serialization via own custom serializers is only possible for one specific PTypeInfo which makes this unusable for own generic types. For that the TCustomSerializer classes would need a CanHandle(AType:  PTypeInfo) function or alike. This would also enable the currently hardcoded support for dataset, stream and RTL collections to be handled over this mechanism without having to hardcode them into TNeonSerializerJSON.WriteDataMember

Edited by Stefan Glienke

Share this post


Link to post

Just an update on this - I've been moving my persistence code (app settings, project definitions etc) from XML to JSON.  So far Neon is the only library that's coped with all of my classes.  I've tried maybe 6 or 7 other libraries (both commercial and open-source).  

  • Like 1
  • Thanks 1

Share this post


Link to post

I use it as main serializer/deserializer for various json based protocols. No complaints so far and it makes programming easier. I did not benchmark it for speed, because we are only talking about a few messages per second.

 

For serializing/deserialiszing table data I use viniciussanchez/dataset-serialize: JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC) (github.com)

Share this post


Link to post

I'm using almost only this library to interact with json stuff and for me it works fine.

 

This library is the json serialization/deserialization base tool for the REST library WiRL https://github.com/paolo-rossi/WiRL (other great free tool that I'm using).

 

I'm also using NEON to interact without problem (and forgetting what json is) with some web services like Brevo, Skebby and others.

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

×