Skip to content

Fast and flexible library for parse a Java-Objects to JSON

License

Notifications You must be signed in to change notification settings

MikhailSterkhov/Nodeson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

‹ NODESON ›

MIT License


ABOUT

Maximum speed for parsing and converting Java Objects to JSON format:

  • Use various parsing options
  • Multi-thread parsing and conversion
  • Flexibility

The qualities listed above fully describe the performance of this library.


HOW TO USE?

First, let's define what kind of parser we need.

There are only two types of parsing in this library:

  • Common
NodesonParser common = Nodeson.common();
  • Parallel (Multi-Threaded)
NodesonParser parallel = Nodeson.parallel();

Then we can already reproduce the necessary parsing algorithms.

Let's try to parse an object to JSON and back, measuring the speed:

Common: (189ms)

String json = common.parseTo(testObject); // 178ms
        
TestObject converted = common.parseFrom(json, TestObject.class); // 11ms

Parallel: (109ms)

String json = parallel.parseTo(testObject); // 101ms
        
TestObject converted = parallel.parseFrom(json, TestObject.class); // 7ms

PLEASE, SUPPORT ME

By clicking on this link, you can support me as a developer and motivate me to develop new open-source projects!

Buy Me A Coffee