Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ParserRead 40 charactersWrite 40 characters Read 100 charactersWrite 100 charactersRead 1000 charactersWrite 1000 charactersIssues
Jackson7.488 microseconds0.296 microseconds10.984 microseconds0.567 microseconds50.49 microseconds5.12 microseconds
GSON0.509 microseconds0.531 microseconds0.818 microseconds1.332 microseconds8.212 microseconds14.884 microsecondsGSON parses all numerical values to Doubles and as such it unable to dynamically allocate the object type that it is parsing 


ParserProsCons
Jackson

Consistent conversion of numerics
More widely used
Faster writes ****
Built into Spring Framework
Has annotation support

Slower Read
GSONFaster Reads

Converts numerics to Doubles
Less Popular






Resolution

It would make the most sense to use GSON as much as possible as it is the faster than Jackson. However the practicality of Jacksons parsing cannot be overlooked. Therefore it would make sense to use the Jackson parser in this scenario. We also don't want to have or create a Jackson mapper and GSON mapper object in the same file however as the memory cost is quite high.

...