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 import
s client not know about.
how can share anyway server object structure (unannotated?) pojos client? tia!
try java generator json https://javafromjson.dashingrocket.com/
Comments
Post a Comment