Java Encode encode(Object o)

Here you can find the source of encode(Object o)

Description

encode

License

Open Source License

Declaration

public static String encode(Object o) throws IOException 

Method Source Code

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

import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;

public class Main {
    private static final ObjectMapper om = new ObjectMapper();

    public static String encode(Object o) throws IOException {
        return om.writeValueAsString(o);
    }/*from ww w.java  2s  .c  o  m*/
}

Related

  1. encode(Object o)
  2. encode(Object obj)
  3. encode(Serializable s)
  4. encode(T obj)