https://github.com/marschall/jackson-jaxp-bridge
https://github.com/marschall/jackson-jaxp-bridge
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/marschall/jackson-jaxp-bridge
- Owner: marschall
- Created: 2022-12-09T13:45:35.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-18T15:50:56.000Z (over 2 years ago)
- Last Synced: 2025-01-16T02:45:11.412Z (5 months ago)
- Language: Java
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Jackson JAX-P Bridge
====================Adapts JAX-P `JsonValue` objects to Jackson `JsonNode` so that they can be passed to `ObjectReader`.
Usage
-----```java
ObjectMapper objectMapper = ...;
JsonObject jaxpNode = ...;JsonNode jacksonNode = JsonpNodeAdapter.adapt(jaxpNode, objectMapper.getNodeFactory());
ObjectReader objectReader = objectMapper.readerFor(Project.class);
Project project = objectReader.readValue(jacksonNode);
```Limitations
------------ Only the bare minimum to support `ObjectReader` is implemented, many mutation methods are missing.
- Only `JsonObject` and `JsonArray` are adapted, all value nodes are lazily copied.