force-rest-api icon indicating copy to clipboard operation
force-rest-api copied to clipboard

asRawJson() option in ResourceRepresentation

Open holtonma opened this issue 8 years ago • 2 comments
trafficstars

https://github.com/jesperfj/force-rest-api/blob/0c224e0f90a1dc4c3a751a4f10a4c6899ad6f09d/src/main/java/com/force/api/ResourceRepresentation.java#L29

In addition to asList() and asMap() and the custom as(Class<T>) it would be nice to expose asRawJson() method or similar. This way one could receive the raw JSON from the endpoint, and deserialize in other/custom ways. Perhaps there's a clean way to do this which I am not seeing, if so any insight in that direction is appreciated. Thank you for the work on this library.

holtonma avatar Jun 20 '17 00:06 holtonma

Yeah. At first glance that should be straightforward and fits well with the architecture where ResourceRepresentation delays deserialization On Mon, Jun 19, 2017 at 5:34 PM Mark Holton [email protected] wrote:

https://github.com/jesperfj/force-rest-api/blob/0c224e0f90a1dc4c3a751a4f10a4c6899ad6f09d/src/main/java/com/force/api/ResourceRepresentation.java#L29

In addition to asList() and asMap() and the custom as(Class<T>) it would be nice to expose asRawJson() method or similar. This way one could receive the raw JSON from the endpoint, and deserialize in other/custom ways. Perhaps there's a clean way to do this which I am not seeing, if so any insight in that direction is appreciated. Thank you for the work on this library.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jesperfj/force-rest-api/issues/47, or mute the thread https://github.com/notifications/unsubscribe-auth/AARUrEJolsob5SxJ8R4LclOQTmcId1_Eks5sFxOEgaJpZM4N-8qW .

jesperfj avatar Jun 20 '17 00:06 jesperfj

Haven't had a chance to look at this in a while. Pull requests are much welcome! :-)

jesperfj avatar Sep 25 '17 16:09 jesperfj