[ 
https://issues.apache.org/jira/browse/SCB-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16556762#comment-16556762
 ] 

ASF GitHub Bot commented on SCB-775:
------------------------------------

liubao68 commented on a change in pull request #837: [SCB-775]support invoke 
service using raw type like JsonObject & String
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/837#discussion_r205309686
 
 

 ##########
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestObjectMapper.java
 ##########
 @@ -17,25 +17,37 @@
 
 package org.apache.servicecomb.common.rest.codec;
 
+import java.io.IOException;
 import java.text.FieldPosition;
 import java.util.Date;
 
+import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.core.JsonParser.Feature;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.JsonSerializer;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.module.SimpleModule;
 import com.fasterxml.jackson.databind.type.TypeFactory;
 
-public final class RestObjectMapper extends ObjectMapper {
-  public static final RestObjectMapper INSTANCE = new RestObjectMapper();
+import io.vertx.core.json.JsonObject;
+
+public class RestObjectMapper extends AbstractRestObjectMapper {
+  private static class JsonObjectSerializer extends JsonSerializer<JsonObject> 
{
 
 Review comment:
   This code looks bad. And I think if others use this, they can change it 
easily as this PR has done. So it's not a problem.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> support invoke service using raw type like JsonObject
> -----------------------------------------------------
>
>                 Key: SCB-775
>                 URL: https://issues.apache.org/jira/browse/SCB-775
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>          Components: Java-Chassis
>            Reporter: liubao
>            Assignee: liubao
>            Priority: Major
>
> When using RestTemplate, can use JsonObject or String as request body 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to