package elasta.webutils.app.impl;

import elasta.webutils.app.RequestConverter;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.RoutingContext;

import java.util.Collections;

/**
 * Created by Jango on 11/7/2016.
 */
public class RequestConverterImpl implements RequestConverter<JsonObject> {
    @Override
    public JsonObject apply(RoutingContext context) throws Throwable {
        JsonObject json = context.getBodyAsJson();
        return json == null ? new JsonObject(Collections.emptyMap()) : json;
    }
}

@@ -226,16 +226,42 @@
 ections;
+%0Aimport java.util.HashMap;
 %0A%0A/**%0A *
@@ -557,28 +557,21 @@
 ect(
-Collections.empty
+new Hash
 Map
+%3C%3E
 ()) 

return mutable json from request converter.