java - Sharing objects with jersey json REST client -


i have written rest service using jersey maps object-structure json-result, like:

@get @produces(mediatype.application_json) @path("/orders/{id}") public order getbyid(@pathparam("id") string orderid) {      return orderservice.getbyid(id); // simplified } 

it works , returns order object structure json structure.

now (jersey) client accesses rest service , gets json structure back. can parse json structure, nice map (the server's) object structure.

but server's objects contain many jpa-annotations , other imports client not know about.

how can share anyway server object structure (unannotated?) pojos client? tia!

try java generator json https://javafromjson.dashingrocket.com/


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -