Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

A demo Java Code for Showing how to implement Jackson deserialization with abstracts.

Notifications You must be signed in to change notification settings

lealceldeiro/abstractmapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abstractmapping

A demo Java Code for Showing how to implement Jackson deserialization with abstracts.

  • Run locally the project (i.e.: ./mvnw spring-boot:run)
  • For getting instances of class B do the following request: { "x": "some value for x here", "y": "some value for y here", "type": "B" }
  • For getting instances of class C do the following request: { "x": "some value for x here", "z": "some value for z here", "type": "C" }

The previous requests can be performed using any commonly used tools with such purpose such as Postman or cURL.

Example in cURL:

curl -X POST --location "http://localhost:8080/demo" \
    -H "Content-Type: application/json" \
    -d "{ \"x\": \"some value for x here\", \"y\": \"some value for y here\", \"type\": \"B\" }"

and

curl -X POST --location "http://localhost:8080/demo" \
    -H "Content-Type: application/json" \
    -d "{ \"x\": \"some value for x here\", \"y\": \"some value for y here\", \"type\": \"C\" }"

About

A demo Java Code for Showing how to implement Jackson deserialization with abstracts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages