package be.ac.ulb.code.wit.resources.serializers.json;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

public class JsonHelpers {
	public static String treeToString(JsonNode n) {
		ObjectMapper m = new ObjectMapper();

		try {
			return m.writeValueAsString(n);
		} catch (Exception e) {
			// TODO: fix this exception handler
			throw new RuntimeException(e);
		}
	}

}
