Just a JSON parser plus a small subset of JSONPath.
Small (currently 4200 lines of code)
Very fast, uses an index overlay from the ground up.
Does not do JavaBean serialization but can serialize into basic Java types and can map to Java classes and Java records.
5. Why a new Parser?
• Why not just update Boon?
• Large, was meant to be a utility lib and became a JSON parser
• 90,000 LoC in (just Java not including test classes)
• Does too many things that no one uses
• Uses index overlay but was not originally designed to use Index Overlay
• Uses Unsafe which is not allowed in new JVMs
6. JParse
• Just a JSON parser plus a small subset of JSONPath
• Small (currently 4200 lines of code)
• Status:
• Perf tuned and worked on usable,
fl
uent API
• Does not use Unsafe
• Very fast, uses an index overlay from the ground up
• Does not do JavaBean serialization but can serialize into basic Java types
8. Caveat on Benchmarks
• JParse is being actively developed, as we add features or make
improvements, it can impact benchmarks
• JParse is focused only on Parse and mini JSONPath
• JParse does not have very many features
• JParse only supports JSON as de
fi
ned by json.org
• No extensions
• No advanced mappings
11. Conclusion for Benchmarks
• Parsers got a lot faster
• Jackson got a lot faster in 9 years
• Other parsers are fast too
• Not as easy to win as it was 9 years ago
24. Nodes are all basic Java types
• ArrayNode is a java.util.List
• ObjectNode is a Map
• All nodes are CharSequences
• NumberNode is java.lang.Number (toInt, toFloat, toDouble, toShort, etc.)
• StringNode is a CharSequence and works well with Strings (toUnencodedString, toString, toEncodedString)
Easy to learn!
27. Continue to use Jackson
• Used in a lot of projects
• Support for other data formats
• Advanced Mappings
• But large
28. When to use JParse
• You want a small footprint JSON parser that is fast
• You don’t need advanced mappings and are willing and able to map using
Functional programming
29. JParse
• Not done yet (BenchMark will change)
• Still needs to improve error handling
• Virtually none so no real useful messages if their are errors
• Boon had really excellent error messages and JParse will to
• Does not support any extras (by design)
• Does not support NaN, +In
fi
nity, -In
fi
nity because that is not in the JSON org spec.
• Does not support any attribute keys but Strings (JSON org spec.)
• Just strict JSON no minimal JSON