001package org.nuxeo.box.api.marshalling.jsonentities; 002 003import org.nuxeo.box.api.marshalling.dao.BoxBase; 004import org.nuxeo.box.api.marshalling.exceptions.BoxJSONException; 005import org.nuxeo.box.api.marshalling.interfaces.IBoxJSONParser; 006import org.nuxeo.box.api.marshalling.interfaces.IBoxJSONStringEntity; 007 008/** 009 * Default implementation of the {@link IBoxJSONStringEntity}, this class utilizes {@see <a 010 * href="http://jackson.codehaus.org">Jackson JSON processer</a>} to convert object into JSON String. 011 */ 012public class DefaultJSONStringEntity extends BoxBase implements IBoxJSONStringEntity { 013 014 @Override 015 public String toJSONString(IBoxJSONParser parser) throws BoxJSONException { 016 return parser.convertBoxObjectToJSONStringQuietly(this); 017 } 018 019}