Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java中velocity的Map语法与jello中velocity的Map语法不统一情况 #3

Open
codingtiger opened this issue Oct 22, 2015 · 0 comments

Comments

@codingtiger
Copy link

问题描述如下(属于特例情况,可以在java后台中去规避,但是还是有不完美的地方):

在java端:

Map<Integer, Object> xxxMap = new HashMap<Integer,Object>();
xxxMap.put(1,new Object());

velocity的取值方式$advertMap[0]

在jello端:

使用json只能使用字符串模拟,当然使用yaml等其他的方式描述本质上也是一样,数据类型不统一。
{
    "xxxMap": {
        "0": {
            "key": "value"
        }
    }
}

对应velocity的取值方式:
$advertMap["0"]

不知可否有好的方法从jello端去解决这种情况?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant