zoukankan      html  css  js  c++  java
  • JSON Template

    public java.lang.String toString() {
    #if ( $members.size() > 0 )
    #set ( $i = 0 )
    return "{"_class":"$classname", " +
    #foreach( $member in $members )
    #set ( $i = $i + 1 )
    #if ( $i == $members.size() )
    #set ( $postfix = "+" )
    #else
    #set ( $postfix = "+ "", "" + " )
    #end
    #if ( $member.collection )
    ""$member.name":" + ($member.accessor == null ? "null" : java.util.Arrays.toString($member.accessor .toArray())) $postfix
    #elseif ( $member.objectArray )
    ""$member.name":" + java.util.Arrays.toString($member.accessor) $postfix
    #elseif ( $member.primitiveArray )
    ""$member.name":" + java.util.Arrays.toString($member.accessor) $postfix
    #elseif ( $member.object )
    #if ($member.typeQualifiedName.contains("java.lang"))
    ""$member.name":" + ($member.accessor == null ? "null" : """ + $member.accessor + """ ) $postfix
    #else
    ""$member.name":" + ($member.accessor == null ? "null" : $member.accessor ) $postfix
    #end
    #else
    ""$member.name":"" + $member.accessor + """ $postfix
    #end
    #end
    "}";
    #else
    return "{"_class":"$classname"}";
    #end
    }
  • 相关阅读:
    PHP CI分页类带多个参数
    PHP oracle分页
    PHP 防范IP攻击
    PHP 防范CC攻击
    PHP 防范xss攻击
    html input
    弹框样式
    php最快捷的插入数据,3000万仅需5秒
    phpcms 后台分页
    phpcms 用phpexcel导入导出excel
  • 原文地址:https://www.cnblogs.com/lvfeilong/p/123213sdfd.html
Copyright © 2011-2022 走看看