https://github.com/deepakbhalla/json-api-examples
https://github.com/deepakbhalla/json-api-examples
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deepakbhalla/json-api-examples
- Owner: deepakbhalla
- Created: 2020-08-31T06:57:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T07:01:06.000Z (over 4 years ago)
- Last Synced: 2025-01-18T17:49:23.252Z (3 months ago)
- Language: Java
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This project demonstrate different ways of converting JSON to Java and Vise Versa using Jackson Binding and GSON API.
# Console Output
* Example 1: JSON to Java Conversion with implicit Json String
----- JSON -----
{"userId": 1, "id": 1, "title": "this is the title", "body": "this is the body" }
------ Java Object ------
[
userId: 1
id: 1
title: this is the title
body: this is the body
]* Example 2: JSON to Java Conversion with implicit Json String
----- JSON -----
{"userId": 1, "id": 1, "title": "this is the title", "body": "this is the body" }
------ Java Object ------
[
userId: 1
id: 1
title: this is the title of user
body: this is the body of the user
]* Example 3: JSON to Java Conversion with implicit Json String
----- JSON -----
{"userId": 1, "id": 1, "title": "this is the title", "body": "this is the body" }
[
userId: 1
id: 1
title: this is the title of user 1
body: this is the body of the user 1
]
[
userId: 1
id: 1
title: this is the title of user 2
body: this is the body of the user 2
]* Example 4: JSON to Java Conversion with implicit Json String
----- JSON -----
{"userId": 1, "id": 1, "title": "this is the title", "body": "this is the body" }
------ Java Object ------
[
userId: 1
id: 1
title: this is the title
body: this is the body
]--------- JSON --------
{"userId":"1","id":"1","title":"this is the title","body":"this is the body"}
Picked up _JAVA_OPTIONS: -Xms1024M