Stéphane Wierzbicki 45 Posted September 7, 2019 I just found this Delphi Library. https://github.com/paolo-rossi/delphi-neon Quote Neon is a serialization library for Delphi that helps you to convert (back and forth) objects and other values to JSON. It supports simple Delphi types but also complex class and records. Did someone test it? Share this post Link to post
Stefan Glienke 2002 Posted September 9, 2019 Amazing amount of unittests 4 Share this post Link to post
David Heffernan 2345 Posted September 9, 2019 Tested 42 and Lorem ipsum, that seems pretty complete to me. 😉 1 4 Share this post Link to post
Bob Devine 11 Posted September 9, 2019 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. 1 Share this post Link to post
David Heffernan 2345 Posted September 9, 2019 Jokes aside, any user that feels that the testing could be broadened can write some tests and submit a PR. 2 Share this post Link to post
Stefan Glienke 2002 Posted September 9, 2019 (edited) 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 September 9, 2019 by Stefan Glienke Share this post Link to post
Bob Devine 11 Posted September 25, 2019 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). 1 1 Share this post Link to post
Khorkhe 1 Posted March 22 @Stefan Glienke out of curiosity, why is System.JSON a no-go, and what alternatives might you recommend? Thanks! Share this post Link to post
omnibrain 15 Posted March 22 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
Davide Angeli 44 Posted March 22 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