SlideShare a Scribd company logo
Java JSON Parser
Comparison
Allan Huang @ Delta DRC
Agenda
 JSON
 Java API for RESTful Web Services
 Java API for JSON Processing
 Java EE Compatible Implementations
 JSON Parser
 Evaluation Criterion
 Parser Candidates
 Evaluation Matrix
JSON
JSON
 JavaScript Object Notation
 A lightweight, text-based, language-independent
data exchange format.
 Built on two structures…
 A collection of name/value pairs, realized as Object:
{ } or Hash Table.
 An ordered list of values, realized as an Array: [ ].
 Used in AJAX applications, configurations,
NoSQL databases, and RESTful web services
Java API for RESTful Web
Services
 Defined as JSR 339 in Java EE 7
 JAX-RS 2.0 specification
 Use HTTP methods to interact with the resource
 GET to retrieve a resource
 POST to create a resource
 PUT to update a resource
 DELETE to remove a resource
 Communication between the client and the
endpoint is Stateless.
Java API for JSON Processing
 Defined as JSR 353 in Java EE 7
 Streaming API
 JSON Pull Parser
 Similar to StAX API for XML
 Uses an event-based parser that reads JSON data
one element at a time.
 Object Model API
 JSON Push Parser
 Similar to DOM API for XML
 Creates a object tree that represents the JSON data in
memory.
Streaming API
 Generates JSON output
to a given stream by
making a function call
with one element at a
time.
 Provides forward, read-
only access to the JSON
data.
Streaming API Example
Json Parser Json Generator
Object Model API
 Generates JSON output
by navigating the entire
tree at once.
 It’s slower than streaming
model and requires more
memory.
Object Model API Example
Json Reader Json Writer
Model API Comparison
 If you want to…
 read a large amount
of JSON.
 write JSON to a
char/byte stream.
 random access
JSON in memory.
 reuse JSON without
need to reparse.
Java EE 7 Compatible
Implementations
Full Platform distribution Web Profile distribution
Java EE 6 Compatible
Implementations (1)
Full Platform distribution
Java EE 6 Compatible
Implementations (2)
Web Profile distributions
Java EE FAQ
 Web Profile vs. Full Platform
 Java EE introduced the lightweight Web Profile
optimized for web applications.
 e.g. GlassFish Server Open Source Edition 3.1.x
 TomEE
 An all-Apache Java EE Web Profile certified stack
where Apache Tomcat is top dog.
 Current version 1.7 supports Java EE 6
 Next version 2.x support Java EE 7
 Wildfly – formerly known as JBoss AS
JSON Parser
Evaluation Criterion (1)
 Community Activity
 Repository, Organization, Downloads, Project
References
 Performance Ranking
 Revision
 Previous Release Date, Last Release Date, Last
Revision Number, Revision Frequency, Total
Open Issues
Evaluation Criterion (2)
 API Richness
 Object Model API, Streaming API support, Java
Annotation, Serialization / De-serialization,
Documentation & Example
 Dependency
 3rd
-party Libraries
 Minimum JDK Version
 License
 MIT, BSD, Apache 2.0 ...
License
Parser Candidates
JSON Parser
 json.org
 Jackson
 Google GSON
 json-lib
 javax json
 json-simple
 json-smart
 flexjson
 fastjson
Performance Report
 Top 7 Open-Source JSON-Bin
 JSON serialization
benchmarks
 Revisiting a (JSON) Benchmar
 jvm-serializers
 json-parsers-benchmark
 Json BecnhMark
Parser Matrix  Java JSON Parser
Criteria javax json Jackson Google GSON json.org json-lib json-simple json-smart flexjson fastjson
Community Activity
Repository Oracle Java Net GitHub Google Code GitHub Sourceforge Google Code Google Code Sourceforge GitHub
Organization Oracle N/A Google JSON org N/A N/A N/A N/A Alibaba
Downloads Unknown Unknown 521,946 Unknown 316,668 228,839 12,213 48,276 8,412
Project References 40 215 forks 8 1268 forks 12 33 7 Unknown 586 forks
Performance
Ranking
Top 7 Open-Source
(Small)
N/A 3 1 N/A 4 N/A N/A 2 N/A
Top 7 Open-Source
(Large)
N/A 1 3 N/A 2 N/A N/A 4 N/A
JSON serialization
benchmarks
N/A 1 2 N/A N/A N/A N/A N/A N/A
Revisiting a (JSON)
Benchmark
N/A 1 2 N/A N/A N/A N/A N/A N/A
jvm-serializers N/A 1 3 6 8 5 4 7 2
json-parsers-
benchmark
(Boon)
N/A 1 2 N/A N/A N/A 3 N/A N/A
Json BecnhMark
(json-smart)
N/A 3 N/A 5 6 4 1 N/A 2
Revision
Previous Release
Date
Unknown 2014/8/15 2013/5/13 Unknown 2009/7/11 2009/2/15 2013/8/13 2013/5/19 2014/5/20
Last Release Date 2013/11/18 2014/10/4 2014/8/11 2014/5/22 2010/12/14 2012/2/18 2013/8/15 2013/7/31 2014/10/11
Last Revision
Number
1.0.4 2.4.3 2.3 N/A 2.4 1.1.1 2.0-RC3 3.2 1.1.42
Revision Frequency Sometimes Always Sometimes Often No Longer No Longer Rarely Rarely Often
Total Open Issues 6 bugs
7 issues
2 pull reqeusts
84 defects
32 enhancements
3 pull requests 35 bugs
10 defects
16 enhancements
5 defects
2 enhancements
8 bugs 10 issues
API Richness
Object Model API
Support
Yes Yes Yes Yes Yes Yes Yes Yes Yes
Streaming API
Support
Yes Yes Yes No No Yes Yes No Yes
Java Annotation Yes Yes Yes No No No No Yes Yes
Serialization & De-
serialization
Yes Yes Yes Yes
Yes, but hard to
use
No
Yes, but hard to
use
Yes Yes
Documentation &
Example
Rich Rich Rich Poor Enough Enough Poor Poor Enough
Dependency
3rd-party Libraries 0 0 0 0 Apache commons 0 0 0 0
Minimum JDK
Version
1.7 1.6 1.6 1.8 1.5 1.2 1.5 1.6 1.5
License License
CDDL 1.1
GPL 2.0
Apache 2.0
LGPL 2.1
Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0
Conclusion
 “Top 7 Open-Source JSON-Binding
Providers Available Today” said…
 Google GSON
 Process small size data
 Jackson
 Process large size data
 Upgrade Java EE 7 application server? Use
Open-Source solution? Which parser is best
for RAM / IoT?
Reference
 Java API for JSON Processing: An Introduction to JSON
 Creating JSON Data Using The Java JSON API (JSR 353)
 Java JSON Processing API Example Tutorial
 Top 7 Open-Source JSON-Binding Providers Available Today
 Java EE 7/6 Compatibility
 Java EE FAQ
 GlassFish Server Open Source Edition 3.1.x
 Apache TomEE
 Support JSON JSR 353 - Java API for JSON Processing (JSON-P)
 軟體的授權觀念與自由軟體授權條款介紹
Q&A

More Related Content

What's hot

Logging in Scala
Logging in ScalaLogging in Scala
Logging in Scala
John Nestor
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
Jodok Batlogg
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdomguest3933de
 
Query DSL In Elasticsearch
Query DSL In ElasticsearchQuery DSL In Elasticsearch
Query DSL In Elasticsearch
Knoldus Inc.
 
Turning a Search Engine into a Relational Database
Turning a Search Engine into a Relational DatabaseTurning a Search Engine into a Relational Database
Turning a Search Engine into a Relational Database
Matthias Wahl
 
Design and architecture of Jackrabbit
Design and architecture of JackrabbitDesign and architecture of Jackrabbit
Design and architecture of Jackrabbit
Jukka Zitting
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
Trisha Gee
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
mircodotta
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Oleksiy Panchenko
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
Martin Odersky
 
Content Management With Apache Jackrabbit
Content Management With Apache JackrabbitContent Management With Apache Jackrabbit
Content Management With Apache JackrabbitJukka Zitting
 
/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository
Jukka Zitting
 
#Pharo Days 2016 Data Formats and Protocols
#Pharo Days 2016 Data Formats and Protocols#Pharo Days 2016 Data Formats and Protocols
#Pharo Days 2016 Data Formats and Protocols
Philippe Back
 
Native hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linkerNative hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linker
Kevin Mai-Hsuan Chia
 
Hacking Lucene for Custom Search Results
Hacking Lucene for Custom Search ResultsHacking Lucene for Custom Search Results
Hacking Lucene for Custom Search Results
OpenSource Connections
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
Barry Jones
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
Knoldus Inc.
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
Ryan Cuprak
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON
 

What's hot (20)

Logging in Scala
Logging in ScalaLogging in Scala
Logging in Scala
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdom
 
Query DSL In Elasticsearch
Query DSL In ElasticsearchQuery DSL In Elasticsearch
Query DSL In Elasticsearch
 
Turning a Search Engine into a Relational Database
Turning a Search Engine into a Relational DatabaseTurning a Search Engine into a Relational Database
Turning a Search Engine into a Relational Database
 
Design and architecture of Jackrabbit
Design and architecture of JackrabbitDesign and architecture of Jackrabbit
Design and architecture of Jackrabbit
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Content Management With Apache Jackrabbit
Content Management With Apache JackrabbitContent Management With Apache Jackrabbit
Content Management With Apache Jackrabbit
 
/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository
 
#Pharo Days 2016 Data Formats and Protocols
#Pharo Days 2016 Data Formats and Protocols#Pharo Days 2016 Data Formats and Protocols
#Pharo Days 2016 Data Formats and Protocols
 
Native hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linkerNative hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linker
 
Introducing ELK
Introducing ELKIntroducing ELK
Introducing ELK
 
Hacking Lucene for Custom Search Results
Hacking Lucene for Custom Search ResultsHacking Lucene for Custom Search Results
Hacking Lucene for Custom Search Results
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
 

Similar to Java JSON Parser Comparison

Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
Oracle
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?
gedoplan
 
Java ee 7 New Features
Java ee 7   New FeaturesJava ee 7   New Features
Java ee 7 New Features
Shahzad Badar
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
Mohamed Taman
 
JSONpedia - Facilitating consumption of MediaWiki content
JSONpedia - Facilitating consumption of MediaWiki contentJSONpedia - Facilitating consumption of MediaWiki content
JSONpedia - Facilitating consumption of MediaWiki content
Michele Mostarda
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
Alexis Moussine-Pouchkine
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Episode 8  - Path To Code - Integrate Salesforce with external system using R...Episode 8  - Path To Code - Integrate Salesforce with external system using R...
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Jitendra Zaa
 
Iasi code camp 12 october 2013 jax-rs-jee-ecosystem - catalin mihalache
Iasi code camp 12 october 2013   jax-rs-jee-ecosystem - catalin mihalacheIasi code camp 12 october 2013   jax-rs-jee-ecosystem - catalin mihalache
Iasi code camp 12 october 2013 jax-rs-jee-ecosystem - catalin mihalacheCodecamp Romania
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
OSGi Persistence With EclipseLink
OSGi Persistence With EclipseLinkOSGi Persistence With EclipseLink
OSGi Persistence With EclipseLink
Shaun Smith
 
Silicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you RESTSilicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you REST
Manish Pandit
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
Digicomp Academy AG
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
Mauricio "Maltron" Leal
 
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and SprayNexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Matthew Farwell
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
Kumaraswamy M
 
Creation of a Test Bed Environment for Core Java Applications using White Box...
Creation of a Test Bed Environment for Core Java Applications using White Box...Creation of a Test Bed Environment for Core Java Applications using White Box...
Creation of a Test Bed Environment for Core Java Applications using White Box...
cscpconf
 
Open sourcing the store
Open sourcing the storeOpen sourcing the store
Open sourcing the store
Mike Nakhimovich
 
Tableau Architecture
Tableau ArchitectureTableau Architecture
Tableau Architecture
Kishore Chaganti
 

Similar to Java JSON Parser Comparison (20)

Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?
 
Java ee 7 New Features
Java ee 7   New FeaturesJava ee 7   New Features
Java ee 7 New Features
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 
JSONpedia - Facilitating consumption of MediaWiki content
JSONpedia - Facilitating consumption of MediaWiki contentJSONpedia - Facilitating consumption of MediaWiki content
JSONpedia - Facilitating consumption of MediaWiki content
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Episode 8  - Path To Code - Integrate Salesforce with external system using R...Episode 8  - Path To Code - Integrate Salesforce with external system using R...
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
 
Iasi code camp 12 october 2013 jax-rs-jee-ecosystem - catalin mihalache
Iasi code camp 12 october 2013   jax-rs-jee-ecosystem - catalin mihalacheIasi code camp 12 october 2013   jax-rs-jee-ecosystem - catalin mihalache
Iasi code camp 12 october 2013 jax-rs-jee-ecosystem - catalin mihalache
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
OSGi Persistence With EclipseLink
OSGi Persistence With EclipseLinkOSGi Persistence With EclipseLink
OSGi Persistence With EclipseLink
 
Silicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you RESTSilicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you REST
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and SprayNexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and Spray
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Creation of a Test Bed Environment for Core Java Applications using White Box...
Creation of a Test Bed Environment for Core Java Applications using White Box...Creation of a Test Bed Environment for Core Java Applications using White Box...
Creation of a Test Bed Environment for Core Java Applications using White Box...
 
Open sourcing the store
Open sourcing the storeOpen sourcing the store
Open sourcing the store
 
Tableau Architecture
Tableau ArchitectureTableau Architecture
Tableau Architecture
 

More from Allan Huang

Concurrency in Java
Concurrency in  JavaConcurrency in  Java
Concurrency in Java
Allan Huang
 
Netty 4-based RPC System Development
Netty 4-based RPC System DevelopmentNetty 4-based RPC System Development
Netty 4-based RPC System DevelopmentAllan Huang
 
eSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureeSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureAllan Huang
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New EvolutionAllan Huang
 
JQuery New Evolution
JQuery New EvolutionJQuery New Evolution
JQuery New EvolutionAllan Huang
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignAllan Huang
 
Boilerpipe Integration And Improvement
Boilerpipe Integration And ImprovementBoilerpipe Integration And Improvement
Boilerpipe Integration And ImprovementAllan Huang
 
Build Cross-Platform Mobile Application with PhoneGap
Build Cross-Platform Mobile Application with PhoneGapBuild Cross-Platform Mobile Application with PhoneGap
Build Cross-Platform Mobile Application with PhoneGapAllan Huang
 
HTML5 Multithreading
HTML5 MultithreadingHTML5 Multithreading
HTML5 MultithreadingAllan Huang
 
HTML5 Offline Web Application
HTML5 Offline Web ApplicationHTML5 Offline Web Application
HTML5 Offline Web ApplicationAllan Huang
 
HTML5 Data Storage
HTML5 Data StorageHTML5 Data Storage
HTML5 Data StorageAllan Huang
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
Allan Huang
 
Weighted feed recommand
Weighted feed recommandWeighted feed recommand
Weighted feed recommandAllan Huang
 
eSobi Site Initiation
eSobi Site InitiationeSobi Site Initiation
eSobi Site InitiationAllan Huang
 
Architecture of eSobi club based on J2EE
Architecture of eSobi club based on J2EEArchitecture of eSobi club based on J2EE
Architecture of eSobi club based on J2EEAllan Huang
 
J2EE Performance Monitor (Profiler)
J2EE Performance Monitor (Profiler)J2EE Performance Monitor (Profiler)
J2EE Performance Monitor (Profiler)Allan Huang
 
Search is not only search
Search is not only searchSearch is not only search
Search is not only search
Allan Huang
 

More from Allan Huang (20)

Concurrency in Java
Concurrency in  JavaConcurrency in  Java
Concurrency in Java
 
Drools
DroolsDrools
Drools
 
Netty 4-based RPC System Development
Netty 4-based RPC System DevelopmentNetty 4-based RPC System Development
Netty 4-based RPC System Development
 
eSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureeSobi Website Multilayered Architecture
eSobi Website Multilayered Architecture
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New Evolution
 
JQuery New Evolution
JQuery New EvolutionJQuery New Evolution
JQuery New Evolution
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Boilerpipe Integration And Improvement
Boilerpipe Integration And ImprovementBoilerpipe Integration And Improvement
Boilerpipe Integration And Improvement
 
YQL Case Study
YQL Case StudyYQL Case Study
YQL Case Study
 
Build Cross-Platform Mobile Application with PhoneGap
Build Cross-Platform Mobile Application with PhoneGapBuild Cross-Platform Mobile Application with PhoneGap
Build Cross-Platform Mobile Application with PhoneGap
 
HTML5 Multithreading
HTML5 MultithreadingHTML5 Multithreading
HTML5 Multithreading
 
HTML5 Offline Web Application
HTML5 Offline Web ApplicationHTML5 Offline Web Application
HTML5 Offline Web Application
 
HTML5 Data Storage
HTML5 Data StorageHTML5 Data Storage
HTML5 Data Storage
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
 
Weighted feed recommand
Weighted feed recommandWeighted feed recommand
Weighted feed recommand
 
Web Crawler
Web CrawlerWeb Crawler
Web Crawler
 
eSobi Site Initiation
eSobi Site InitiationeSobi Site Initiation
eSobi Site Initiation
 
Architecture of eSobi club based on J2EE
Architecture of eSobi club based on J2EEArchitecture of eSobi club based on J2EE
Architecture of eSobi club based on J2EE
 
J2EE Performance Monitor (Profiler)
J2EE Performance Monitor (Profiler)J2EE Performance Monitor (Profiler)
J2EE Performance Monitor (Profiler)
 
Search is not only search
Search is not only searchSearch is not only search
Search is not only search
 

Recently uploaded

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 

Recently uploaded (20)

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 

Java JSON Parser Comparison

  • 2. Agenda  JSON  Java API for RESTful Web Services  Java API for JSON Processing  Java EE Compatible Implementations  JSON Parser  Evaluation Criterion  Parser Candidates  Evaluation Matrix
  • 4. JSON  JavaScript Object Notation  A lightweight, text-based, language-independent data exchange format.  Built on two structures…  A collection of name/value pairs, realized as Object: { } or Hash Table.  An ordered list of values, realized as an Array: [ ].  Used in AJAX applications, configurations, NoSQL databases, and RESTful web services
  • 5. Java API for RESTful Web Services  Defined as JSR 339 in Java EE 7  JAX-RS 2.0 specification  Use HTTP methods to interact with the resource  GET to retrieve a resource  POST to create a resource  PUT to update a resource  DELETE to remove a resource  Communication between the client and the endpoint is Stateless.
  • 6. Java API for JSON Processing  Defined as JSR 353 in Java EE 7  Streaming API  JSON Pull Parser  Similar to StAX API for XML  Uses an event-based parser that reads JSON data one element at a time.  Object Model API  JSON Push Parser  Similar to DOM API for XML  Creates a object tree that represents the JSON data in memory.
  • 7. Streaming API  Generates JSON output to a given stream by making a function call with one element at a time.  Provides forward, read- only access to the JSON data.
  • 8. Streaming API Example Json Parser Json Generator
  • 9. Object Model API  Generates JSON output by navigating the entire tree at once.  It’s slower than streaming model and requires more memory.
  • 10. Object Model API Example Json Reader Json Writer
  • 11. Model API Comparison  If you want to…  read a large amount of JSON.  write JSON to a char/byte stream.  random access JSON in memory.  reuse JSON without need to reparse.
  • 12. Java EE 7 Compatible Implementations Full Platform distribution Web Profile distribution
  • 13. Java EE 6 Compatible Implementations (1) Full Platform distribution
  • 14. Java EE 6 Compatible Implementations (2) Web Profile distributions
  • 15. Java EE FAQ  Web Profile vs. Full Platform  Java EE introduced the lightweight Web Profile optimized for web applications.  e.g. GlassFish Server Open Source Edition 3.1.x  TomEE  An all-Apache Java EE Web Profile certified stack where Apache Tomcat is top dog.  Current version 1.7 supports Java EE 6  Next version 2.x support Java EE 7  Wildfly – formerly known as JBoss AS
  • 17. Evaluation Criterion (1)  Community Activity  Repository, Organization, Downloads, Project References  Performance Ranking  Revision  Previous Release Date, Last Release Date, Last Revision Number, Revision Frequency, Total Open Issues
  • 18. Evaluation Criterion (2)  API Richness  Object Model API, Streaming API support, Java Annotation, Serialization / De-serialization, Documentation & Example  Dependency  3rd -party Libraries  Minimum JDK Version  License  MIT, BSD, Apache 2.0 ...
  • 20. Parser Candidates JSON Parser  json.org  Jackson  Google GSON  json-lib  javax json  json-simple  json-smart  flexjson  fastjson Performance Report  Top 7 Open-Source JSON-Bin  JSON serialization benchmarks  Revisiting a (JSON) Benchmar  jvm-serializers  json-parsers-benchmark  Json BecnhMark
  • 21. Parser Matrix  Java JSON Parser Criteria javax json Jackson Google GSON json.org json-lib json-simple json-smart flexjson fastjson Community Activity Repository Oracle Java Net GitHub Google Code GitHub Sourceforge Google Code Google Code Sourceforge GitHub Organization Oracle N/A Google JSON org N/A N/A N/A N/A Alibaba Downloads Unknown Unknown 521,946 Unknown 316,668 228,839 12,213 48,276 8,412 Project References 40 215 forks 8 1268 forks 12 33 7 Unknown 586 forks Performance Ranking Top 7 Open-Source (Small) N/A 3 1 N/A 4 N/A N/A 2 N/A Top 7 Open-Source (Large) N/A 1 3 N/A 2 N/A N/A 4 N/A JSON serialization benchmarks N/A 1 2 N/A N/A N/A N/A N/A N/A Revisiting a (JSON) Benchmark N/A 1 2 N/A N/A N/A N/A N/A N/A jvm-serializers N/A 1 3 6 8 5 4 7 2 json-parsers- benchmark (Boon) N/A 1 2 N/A N/A N/A 3 N/A N/A Json BecnhMark (json-smart) N/A 3 N/A 5 6 4 1 N/A 2 Revision Previous Release Date Unknown 2014/8/15 2013/5/13 Unknown 2009/7/11 2009/2/15 2013/8/13 2013/5/19 2014/5/20 Last Release Date 2013/11/18 2014/10/4 2014/8/11 2014/5/22 2010/12/14 2012/2/18 2013/8/15 2013/7/31 2014/10/11 Last Revision Number 1.0.4 2.4.3 2.3 N/A 2.4 1.1.1 2.0-RC3 3.2 1.1.42 Revision Frequency Sometimes Always Sometimes Often No Longer No Longer Rarely Rarely Often Total Open Issues 6 bugs 7 issues 2 pull reqeusts 84 defects 32 enhancements 3 pull requests 35 bugs 10 defects 16 enhancements 5 defects 2 enhancements 8 bugs 10 issues API Richness Object Model API Support Yes Yes Yes Yes Yes Yes Yes Yes Yes Streaming API Support Yes Yes Yes No No Yes Yes No Yes Java Annotation Yes Yes Yes No No No No Yes Yes Serialization & De- serialization Yes Yes Yes Yes Yes, but hard to use No Yes, but hard to use Yes Yes Documentation & Example Rich Rich Rich Poor Enough Enough Poor Poor Enough Dependency 3rd-party Libraries 0 0 0 0 Apache commons 0 0 0 0 Minimum JDK Version 1.7 1.6 1.6 1.8 1.5 1.2 1.5 1.6 1.5 License License CDDL 1.1 GPL 2.0 Apache 2.0 LGPL 2.1 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0 Apache 2.0
  • 22. Conclusion  “Top 7 Open-Source JSON-Binding Providers Available Today” said…  Google GSON  Process small size data  Jackson  Process large size data  Upgrade Java EE 7 application server? Use Open-Source solution? Which parser is best for RAM / IoT?
  • 23. Reference  Java API for JSON Processing: An Introduction to JSON  Creating JSON Data Using The Java JSON API (JSR 353)  Java JSON Processing API Example Tutorial  Top 7 Open-Source JSON-Binding Providers Available Today  Java EE 7/6 Compatibility  Java EE FAQ  GlassFish Server Open Source Edition 3.1.x  Apache TomEE  Support JSON JSR 353 - Java API for JSON Processing (JSON-P)  軟體的授權觀念與自由軟體授權條款介紹
  • 24. Q&A