Using custom types with Automation REST APIs

I am trying to use Jackson to serialize/deserialize custom types returned by my custom automation operations, but I am having little success so far. On the server side I have been able to register a new Codec that uses a Jackson ObjectMapper to write out the JSON, and that works fine.

On the client side however, JsonMarshalling strips the object & entity type tokens before going into the configured custom marshaller, and as a result that marshaller can't directly use Jackson (which wants the start object tag).

Is there any way to leverage the automation APIs and still benefit from what Jackson supports of the box (generic object serializing, JAXB/Jackson annotated objects, Java collections…)?

Ultimately I am trying to write an operation that returns the results of a QueryAndFetch call as a Java List of Java Maps:

[ { "ecm:uuid": owieruoru, "dc:title": "Document 1" }, ... ]

Thanks!

0 votes

0 answers

780 views

ANSWER