Skip to content

A minimal, source-centric API for parsing a JSON Object, with implementations for most Java JSON Parsers.

License

Notifications You must be signed in to change notification settings

eleusoft/jsonread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonread

License Javadoc Build Status

A minimal, source-centric API to build an object model from a serialized JSON Object, with implementations for most (Java) JSON parsers.

Purpose

The main purpose of the JsonRead API is to isolate a common functionality needed by many binding applications in one simple but complete API that has many different implementations.

The JsonRead API is meant for a low level client that must parse a serialized JSON Object and access through a complete object model the JSON Values contained in it, an example is a generic binding processor.

The JsonRead API is not meant for a high level client that wants to easily bound Java types to values serialized in some JSON (Eg: no accessors to bound values like getDouble(key) or getString(key)).

The JsonRead API is also a way to test performance and correctness of the available JSON parsers.

Simple

The JsonRead API is tiny and simple to use and also simple to implement: it takes an hour to wrap an implementation.

Complete

The JsonRead API representsa JSON with an object model that fully supports the concepts present in the JSON Specification, in this is similar to the javax.json API but:

  1. JsonRead supports only parsing and not serialization.
  2. JsonRead supports only parsing to an object model, has no streaming API.
  3. JsonRead prescribes to the implementation to maintain the lexical value of a JSON Number as found in the source

Implementations

There are implementations of the JsonRead API for the following (Java) JSON Parsers:

Elapsed% of Tot% of Min% of Max
JsonReadProviderJackson44415,53%100,00%36,68%
JsonReadProviderLazyjson49476,16%111,39%40,85%
JsonReadProviderMinimaljson50806,32%114,39%41,95%
JsonReadProviderGlassfish67628,42%152,26%55,84%
JsonReadProviderJohnzon814110,13%183,31%67,23%
JsonReadProviderFastjson872210,86%196,40%72,03%
JsonReadProviderCookjson989712,32%222,86%81,73%
JsonReadProviderGson951511,85%214,25%78,58%
JsonReadProviderNanojson1071413,34%241,25%88,48%
JsonReadProviderMjson1210915,07%272,66%100,00%

License

Jsonread is released under the Apache 2.0 license.

Copyright 2017 Michele Vivoda

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A minimal, source-centric API for parsing a JSON Object, with implementations for most Java JSON Parsers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published