Package railo.runtime.interpreter

Examples of railo.runtime.interpreter.JSONExpressionInterpreter


      HTTPResponse res = HTTPEngine4Impl.post(
        HTTPUtil.toURL(url,true),
        client.getServerUsername(),
        client.getServerPassword(), -1L, -1, config.getWebCharset(), "Railo Remote Invocation", client.getProxyData(), null,params);
   
      return new JSONExpressionInterpreter().interpret(pc, res.getContentAsString());
     
    }
    catch (IOException ioe) {
      throw Caster.toPageException(ioe);
    }
View Full Code Here


                args=new CFMLExpressionInterpreter().interpret(pc, str);
              }
              // JSON
              if(UDF.RETURN_FORMAT_JSON==format)  {
                 // do not catch exception when format is defined
                args=new JSONExpressionInterpreter(false).interpret(pc, str);
              }
              // default
              else {
                 // catch exception when format is not defined, then in this case the string can also be a simple argument
                try {
                  args=new JSONExpressionInterpreter(false).interpret(pc, str);
                }
                catch (PageException pe) {
                  try {
                    args=new CFMLExpressionInterpreter().interpret(pc, str);
                  }
View Full Code Here

            if(args==null){
              args=pc.getHttpServletRequest().getAttribute("argumentCollection");
            }
           
            if(args instanceof String){
              args=new JSONExpressionInterpreter().interpret(pc, (String)args);
            }
           
            if(args!=null) {
              if(Decision.isCastableToStruct(args)){
                Struct sct = Caster.toStruct(args,false);
View Full Code Here

  public static Object call(PageContext pc, String JSONVar) throws PageException {
      return call(pc,JSONVar,true);
  }
  public static Object call(PageContext pc, String JSONVar,boolean strictMapping) throws PageException {
    Object result = new JSONExpressionInterpreter().interpret(pc, JSONVar);
    if(!strictMapping) return toQuery(result);
    return result;
  }
View Full Code Here

  public static Object toObject(PageContext pc,byte[] data, int format, Charset charset, Object defaultValue) {
    switch(format) {
      case UDF.RETURN_FORMAT_JSON:
        try{
          return new JSONExpressionInterpreter().interpret(pc, toString(data,charset));
        }
        catch(PageException pe){}
      break;
      case UDF.RETURN_FORMAT_SERIALIZE:
        try{
View Full Code Here

public class IsJSON {
  public static boolean call(PageContext pc, Object obj) {
    String str=Caster.toString(obj,null);
    if(StringUtil.isEmpty(str,true)) return false;
    try {
      new JSONExpressionInterpreter().interpret(pc, str);
      return true;
    } catch (PageException e) {
      return false;
    }
  }
View Full Code Here

TOP

Related Classes of railo.runtime.interpreter.JSONExpressionInterpreter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.