001 package railo.runtime.functions.dynamicEvaluation; 002 003 004 import railo.runtime.PageContext; 005 import railo.runtime.converter.ConverterException; 006 import railo.runtime.converter.ScriptConverter; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.ext.function.Function; 009 import railo.runtime.op.Caster; 010 011 /** 012 * Implements the CFML Function Serialize 013 */ 014 public final class Serialize implements Function { 015 016 public static String call(PageContext pc , Object o) throws PageException { 017 try { 018 return new ScriptConverter().serialize(o); 019 } catch (ConverterException e) { 020 throw Caster.toPageException(e); 021 } 022 } 023 024 }