Java XML JAXB Marshaller marshal(final Object object)

Here you can find the source of marshal(final Object object)

Description

marshal

License

Open Source License

Declaration

public static final synchronized String marshal(final Object object) throws JAXBException, IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import com.google.gson.Gson;

import java.io.IOException;

import javax.xml.bind.JAXBException;

public class Main {
    public static final synchronized String marshal(final Object object) throws JAXBException, IOException {
        Gson gson = new Gson();
        return gson.toJson(object);
    }//from  ww  w .j  a v  a  2s .c om
}

Related

  1. marshal(Class c, String xml)
  2. marshal(Class clazz, T obj)
  3. marshal(Class clazz, T object)
  4. marshal(final Object obj, final Class... classes)
  5. marshal(final Object object)
  6. marshal(JAXBContext context, Object object, Writer writer, Map properties)
  7. marshal(JAXBElement e, File f)
  8. marshal(JAXBElement jaxbElement, Class cls)
  9. marshal(JAXBElement value, String contextPath, OutputStream out, ClassLoader classLoader)