You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project demonstrates various FasterXML Jackson annotations in a Spring Boot application. It showcases common JSON serialization and deserialization scenarios using Jackson annotations.
4
+
5
+
## Features
6
+
7
+
The project includes examples of the following Jackson annotations:
8
+
9
+
1.**Basic JSON Serialization** (`/hello`)
10
+
- Simple example of JSON response using Spring RestController
11
+
12
+
2.**@JsonIgnore** (`/jsonIgnore`)
13
+
- Demonstrates how to exclude fields from JSON serialization
14
+
- Example shows a field marked with `@JsonIgnore` being excluded from the response
15
+
16
+
3.**@JsonProperty** (`/jsonProperty`)
17
+
- Shows how to customize field names in JSON output
18
+
- Converts camelCase Java field names to snake_case JSON properties
19
+
20
+
4.**@JsonInclude** (`/jsonInclude`)
21
+
- Demonstrates how to control which fields are included in JSON output
22
+
- Example shows excluding null fields from the response
23
+
24
+
## Requirements
25
+
26
+
- Java 21
27
+
- Spring Boot 3.4.5
28
+
29
+
## Running the Application
30
+
31
+
You can run the application using the Maven wrapper:
0 commit comments