This document introduces APIJSON, explaining what it is, its core concepts, and how its major components work together. APIJSON is a JSON-based network transmission protocol and an ORM library that enables zero-code API development and automatic documentation generation.
For detailed information about:
Sources: README.md1-18 README-Chinese.md1-17
APIJSON is a dual-purpose system consisting of:
The system eliminates the need to manually code CRUD APIs. Backend developers provide APIs and Docs without coding, and Frontend developers can customize response JSONs by specifying exactly what data they need README.md10
Core Principle: The JSON structure of the request directly determines the JSON structure of the response. What you request is what you get ("所求即所得") README-Chinese.md9
The following diagram bridges the natural language concept of a "Request" to the specific code entities responsible for processing it within the APIJSONORM library.
System Architecture: Request Flow Through Core Components
Sources: README.md10-18 README-Chinese.md9-10 APIJSONORM/README.md1-3
APIJSON consists of multiple implementation layers across different programming languages, with the Java implementation serving as the reference architecture README.md58-67
APIJSON Ecosystem: Client SDKs, Server Implementations, and Core Components
The project supports a wide range of backend languages including Java 1.8+, Go 1.18+, C# 2.1+, PHP 8.0+, Node.js ES6+, Python 3+, and Rust 1.90+ README.md58-67 For details, see System Architecture.
Sources: README.md58-67 README-Chinese.md56-65
APIJSON uses a universal endpoint pattern where all operations share a small set of base URLs, differentiated by the intended operation (GET, POST, PUT, DELETE) rather than custom resource paths README.md10-18
| Method | Endpoint | Purpose | Security Level |
|---|---|---|---|
| GET | /get/ | General data retrieval | Flexible structure |
| HEAD | /head/ | Count retrieval | Flexible structure |
| POST | /post/ | Insert data | Restricted (Strict structure) |
| PUT | /put/ | Update data | Restricted (Strict structure) |
| DELETE | /delete/ | Delete data | Restricted (Strict structure) |
The system distinguishes between "open" methods that allow flexible JSON structures and "secure" methods that require strict structure matching against predefined rules in the Access and Request tables README-Chinese.md9
Sources: README.md10-18 README-Chinese.md9-10
APIJSON requests use a declarative JSON structure where the keys represent database tables and the values represent query criteria README-Chinese.md9 For details on syntax and operators, see APIJSON Protocol.
A single request can perform complex operations including joins, nested queries, and aggregations without the backend developer writing any SQL or API code README.md10
Sources: README.md10-18 README-Chinese.md9-10
APIJSON's Java implementation provides several abstract base classes that define the core logic of the ORM APIJSONORM/README.md1-3
| Component | Primary Responsibility |
|---|---|
AbstractParser | Main entry point; orchestrates parsing and response building. |
AbstractVerifier | Handles role-based access control and request validation. |
AbstractObjectParser | Parses individual JSON objects into SQL configurations. |
AbstractSQLConfig | Generates database-specific SQL strings. |
AbstractSQLExecutor | Executes SQL and handles database connections. |
AbstractFunctionParser | Handles remote function calls and custom logic. |
For a deep dive into these components, see Core ORM Architecture.
Sources: README.md10-18 APIJSONORM/README.md1-3
APIJSON supports over 30 databases across multiple categories README.md21-55:
For details on configuration and dialect handling, see Database Support.
Sources: README.md21-55 README-Chinese.md19-53
APIJSON's zero-code approach provides significant advantages over traditional API development by decoupling data requirements from backend implementation README-Chinese.md9-10
For a detailed breakdown of benefits, see Key Features and Benefits.
Sources: README.md10-18 README-Chinese.md9-10
APIJSON includes a suite of tools for testing and automation:
For more information, see Ecosystem and Tools.
Sources: README.md10-18 CONTRIBUTING.md10-15 APIJSONORM/README.md64-65
Refresh this wiki