org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal()方法的一些代码示例,展示了JSONProvider.marshal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONProvider.marshal()方法的具体详情如下:
包路径:org.apache.cxf.jaxrs.provider.json.JSONProvider
类名称:JSONProvider
方法名:marshal

JSONProvider.marshal介绍

暂无

代码示例

代码示例来源:origin: apache/cxf

protected void marshalCollectionMember(Object obj, Class<?> cls, Type genericType,
                    String enc, OutputStream os) throws Exception {
  if (obj instanceof JAXBElement) {
    obj = ((JAXBElement<?>)obj).getValue();
  } else {
    obj = convertToJaxbElementIfNeeded(obj, cls, genericType);
  }
  if (obj instanceof JAXBElement && cls != JAXBElement.class) {
    cls = JAXBElement.class;
  }
  Marshaller ms = createMarshaller(obj, cls, genericType, enc);
  marshal(ms, obj, cls, genericType, enc, os, true);
}

代码示例来源:origin: apache/cxf

marshal(actualObject, actualClass, genericType, enc, os);

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-extension-providers

marshal(actualObject, actualClass, genericType, enc, os);

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

protected void marshalCollectionMember(Object obj, Class<?> cls, Type genericType,
                    String enc, OutputStream os) throws Exception {
  if (obj instanceof JAXBElement) {
    obj = ((JAXBElement<?>)obj).getValue();    
  } else {
    obj = convertToJaxbElementIfNeeded(obj, cls, genericType);
  }
  
  if (obj instanceof JAXBElement && cls != JAXBElement.class) {
    cls = JAXBElement.class;
  }
  Marshaller ms = createMarshaller(obj, cls, genericType, enc);
  marshal(ms, obj, cls, genericType, enc, os, true);
  
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

marshal(actualObject, actualClass, genericType, enc, os);

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-extension-providers

protected void marshalCollectionMember(Object obj, Class<?> cls, Type genericType,
                    String enc, OutputStream os) throws Exception {
  if (obj instanceof JAXBElement) {
    obj = ((JAXBElement<?>)obj).getValue();
  } else {
    obj = convertToJaxbElementIfNeeded(obj, cls, genericType);
  }
  if (obj instanceof JAXBElement && cls != JAXBElement.class) {
    cls = JAXBElement.class;
  }
  Marshaller ms = createMarshaller(obj, cls, genericType, enc);
  marshal(ms, obj, cls, genericType, enc, os, true);
}

代码示例来源:origin: apache/cxf

protected void marshal(Object actualObject, Class<?> actualClass,
            Type genericType, String enc, OutputStream os) throws Exception {
  actualObject = convertToJaxbElementIfNeeded(actualObject, actualClass, genericType);
  if (actualObject instanceof JAXBElement && actualClass != JAXBElement.class) {
    actualClass = JAXBElement.class;
  }
  Marshaller ms = createMarshaller(actualObject, actualClass, genericType, enc);
  marshal(ms, actualObject, actualClass, genericType, enc, os, false);
}

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-extension-providers

protected void marshal(Object actualObject, Class<?> actualClass,
            Type genericType, String enc, OutputStream os) throws Exception {
  actualObject = convertToJaxbElementIfNeeded(actualObject, actualClass, genericType);
  if (actualObject instanceof JAXBElement && actualClass != JAXBElement.class) {
    actualClass = JAXBElement.class;
  }
  Marshaller ms = createMarshaller(actualObject, actualClass, genericType, enc);
  marshal(ms, actualObject, actualClass, genericType, enc, os, false);
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

protected void marshal(Object actualObject, Class<?> actualClass, 
            Type genericType, String enc, OutputStream os) throws Exception {
  
  actualObject = convertToJaxbElementIfNeeded(actualObject, actualClass, genericType);
  if (actualObject instanceof JAXBElement && actualClass != JAXBElement.class) {
    actualClass = JAXBElement.class;
  }
  
  Marshaller ms = createMarshaller(actualObject, actualClass, genericType, enc);
  marshal(ms, actualObject, actualClass, genericType, enc, os, false);
}

相关文章

微信公众号

最新文章

更多