|
Wanted to start a discussion on this. I have created a JIRA ticket (OFBIZ-2778) with a proof of concept patch attached. The premise is that we remove the JSON specific event handlers (JSONJavaEventHandler, JSONServiceEventHandler, JSONServiceMultiEventHandler, and JSONSimpleEventHandler) and alter the controller request to use a response type of "json" instead.
This seems to make more logic sense to me; it allows us to use any event type and simply serialize to a JSON string. It also allows request chaining (if that makes sense anywhere) and reduces the code base. I also serialize the RESPONSE_CODE for any client-side logic.
If we think this is a reasonable approach going forward, I can remap all of the existing controller requests to this new response, depreciate (remove?) the JSON event handlers, and smoke test.
|