public static Statement marshal(Parameter param, String contentType) {
return marshal(param.getType(), Variable.get(param.getName()), contentType);
}
public static Statement marshal(MetaClass type, Statement statement, String contentType) {
Statement marshallingStatement = null;
if (PrimitiveTypeMarshaller.canHandle(type, contentType)) {
marshallingStatement = PrimitiveTypeMarshaller.marshal(type, statement);
}
else {
marshallingStatement = Stmt.invokeStatic(Marshalling.class, "toJSON", statement);