Tagged articles
4 articles
Page 1 of 1
Java Captain
Java Captain
Aug 22, 2025 · Backend Development

Designing Clean API Responses in Java: From JSON Structure to Global Wrappers

This article explains how to design a standardized JSON response format for Java back‑end APIs, introduces a Result wrapper class, and shows how to automate response wrapping using a custom @ResponseResult annotation, interceptors, and Spring's ResponseBodyAdvice for cleaner, more maintainable code.

JSON responseJavaannotations
0 likes · 7 min read
Designing Clean API Responses in Java: From JSON Structure to Global Wrappers
CSS Magic
CSS Magic
Nov 8, 2024 · Artificial Intelligence

LLM Application Development Tips (3): Exploring LLM API Inputs and Outputs

This article explains how to configure key OpenAI chat completion parameters—such as temperature, top_p, streaming, response format, and tool selection—and walks through the structure of the API's JSON response, highlighting fields like id, model, choices, finish_reason, and usage for better control and cost estimation.

AI agentsAPI parametersJSON response
0 likes · 8 min read
LLM Application Development Tips (3): Exploring LLM API Inputs and Outputs
Programmer DD
Programmer DD
Nov 9, 2020 · Backend Development

How to Implement a Non‑Intrusive Unified JSON Response in Spring Boot

This tutorial explains why a unified JSON format is needed in a Spring Boot project, defines a standard {code, message, data} schema, shows how to create a Result enum and generic wrapper class, and demonstrates global handling with @ResponseResultBody, ResponseBodyAdvice, and @ExceptionHandler for clean, consistent API responses.

Exception HandlingJSON responseJava
0 likes · 14 min read
How to Implement a Non‑Intrusive Unified JSON Response in Spring Boot