J2J is a powerful Java-based JSON transformation library designed to provide flexible and extensible tools for manipulating JSON data. Built on the principles of the popular JOLT library, J2J offers enhanced capabilities for data integration and transformation pipelines.
Try the online web interface to experiment with JSON transformations without installing anything!
<dependency>
<groupId>love.disaster</groupId>
<artifactId>j2j-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
// Create a transformation specification
Object spec = JsonUtils.jsonToObject("{ \"*\": \"&\" }");
// Create a Chainr instance
Chainr chainr = Chainr.fromSpec(spec);
// Transform JSON data
Object input = JsonUtils.jsonToObject("{ \"foo\": \"bar\" }");
Object output = chainr.transform(input);
// Convert back to JSON string
String result = JsonUtils.toJsonString(output);
- Getting Started Guide - Installation and quick start
- User Guide - Comprehensive usage guide
- Tutorials - Step-by-step learning guides
- API Reference - Complete technical reference
- Examples - Practical use cases
- Multiple Transformation Operations: Shift, Default, Remove, Sort, and Chain operations
- Declarative Specifications: Define transformations using JSON specifications
- Command-Line Interface: Use transformations directly from the terminal
- Web Interface: Interactive web-based transformation tool at http://www.disaster.love/j2j/
- Extensible Architecture: Create custom transformations and functions
- Template Engine Integration: Support for Beetl and JSONata expressions
- Comprehensive Validation: Built-in JSON and specification validation
- Performance Optimized: Efficient processing for large JSON documents
- Docker Support: Containerized deployment for easy distribution
Module | Description |
---|---|
j2j-core | Core transformation logic and utilities |
j2j-cli | Command-line interface for JSON transformations |
j2j-complete | Factory classes for transformation chains |
j2j-dependencies | Centralized dependency management |
j2j-web | Web interface for interactive JSON transformations |
Experiment with JSON transformations without installing anything:
👉 http://www.disaster.love/j2j/
# Build the project
mvn clean package -DskipTests
# Build the Docker image
docker build -t j2j-web:latest .
# Run the container
docker run -p 8080:8080 j2j-web:latest
# Clone the repository
git clone https://github.com/your-username/j2j.git
cd j2j
# Build the entire project
mvn clean install
# Run tests
mvn test
# Package for distribution
mvn package
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Inspired by the JOLT library
- Built with Spring Boot
- JSON processing powered by Jackson