A minimal, source-centric API to build an object model from a serialized JSON Object, with implementations for most (Java) JSON parsers.
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.
The JsonRead API is tiny and simple to use and also simple to implement: it takes an hour to wrap an implementation.
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:
- JsonRead supports only parsing and not serialization.
- JsonRead supports only parsing to an object model, has no streaming API.
- JsonRead prescribes to the implementation to maintain the lexical value of a JSON Number as found in the source
There are implementations of the JsonRead API for the following (Java) JSON Parsers:
Any parser that implements the javax.json API of JSR 353
Elapsed | % of Tot | % of Min | % of Max | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JsonReadProviderJackson | 4441 | 5,53% | 100,00% | 36,68% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderLazyjson | 4947 | 6,16% | 111,39% | 40,85% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderMinimaljson | 5080 | 6,32% | 114,39% | 41,95% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderGlassfish | 6762 | 8,42% | 152,26% | 55,84% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderJohnzon | 8141 | 10,13% | 183,31% | 67,23% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderFastjson | 8722 | 10,86% | 196,40% | 72,03% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderCookjson | 9897 | 12,32% | 222,86% | 81,73% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderGson | 9515 | 11,85% | 214,25% | 78,58% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderNanojson | 10714 | 13,34% | 241,25% | 88,48% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JsonReadProviderMjson | 12109 | 15,07% | 272,66% | 100,00% |
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.