Java XML JAXB Serialize deserialize(final Class clazz, final String json)

Here you can find the source of deserialize(final Class clazz, final String json)

Description

deserialize

License

Open Source License

Declaration

public static final Object deserialize(final Class clazz, final String json) throws JAXBException, IOException 

Method Source Code

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

import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;

import javax.xml.bind.JAXBException;

public class Main {
    public static final Object deserialize(final Class clazz, final String json) throws JAXBException, IOException {
        ObjectMapper mapper = new ObjectMapper();
        Object object = mapper.readValue(json, clazz);
        return object;
    }//  w w  w .j  av  a 2 s  . c om
}

Related

  1. deserialize(Class clazz, String filename)
  2. deSerialize(Class docClass, InputStream inputStream)
  3. deserialize(Element elmnt, Class cls)
  4. deserialize(File fXMLFilePath, Class cls)
  5. deserialize(Path input, Class clazz)
  6. deserialize(String data, String className)
  7. deserializeFile(String path, Class clazz)
  8. deserializeFromXmlFile(T defaultObject, String fileName)