An open API service indexing awesome lists of open source software.

https://github.com/deepakbhalla/json-api-examples


https://github.com/deepakbhalla/json-api-examples

Last synced: about 2 months ago
JSON representation

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