I was going through some online resources and found that jackson can be used for serialization and deserialization for java objects and json string respectively. But at the same time i found something called smile . So below are my doubts:
If i am incorrect please guide me to the answer. Thanks.
As i am very new to computer science field, my apology if this question does fits into stack overflow standard.
The major difference between normal JSON markup and Smile is that Smile is a binary markup version of JSON. Since smile is more compact, it has less overhead when deserializing and is a better option for large and complex payloads.
When to use each markup:
The two formats are compatible: you can send Smile and decode as JSON, by wrapping the proper decoder.
Just for clarity. My performance testing shown that modern Jackson with Afterburner has semi equal speed with JSON and Smile. Bson4Jackson is 5 times slower.
jacksonMapper_Json__Stream thrpt 5 950,796 ± 60,451 ops/ms
jacksonMapper_Json__Stream_Ab thrpt 5 1572,641 ± 43,928 ops/ms
jacksonMapper_Smile__Stream thrpt 5 945,343 ± 25,617 ops/ms
jacksonMapper_Smile__Stream_Ab thrpt 5 1482,769 ± 27,915 ops/ms
jacksonMapper_Bson__Stream thrpt 5 329,239 ± 12,119 ops/ms
jacksonMapper_Bson__Stream_Ab thrpt 5 361,253 ± 30,670 ops/ms
Always test with a data set closest to yours.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.