JSONObject.fromJson() with unit tests by sk02241994 · Pull Request #1006 · stleary/JSON-java

#1003

Add support for JSON to POJO deserialization via JSONBuilder

Introduced JSONBuilder class:
Provides customizable mappings for type conversions (Function<Object, ?>) and collection instantiation (Supplier<?>), enabling extensible JSON deserialization logic.

Enhanced JSONObject:
Added support for converting JSON into Java POJOs using a new method: fromJson(Class).
Supports nested objects, collections (e.g., List), and custom type mappings via JSONBuilder.
Optional JSONBuilder can be passed via constructor or setter.
Added comprehensive unit tests in JSONObjectTest:
Covers deserialization of primitive types, nested classes, collections, and parameterized generics (e.g., List<List>).
Includes tests for custom type mapping (e.g., LocalDateTime).