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

The "context" under TileAction defined as type String #10

Open
yingjieg opened this issue Nov 26, 2014 · 1 comment
Open

The "context" under TileAction defined as type String #10

yingjieg opened this issue Nov 26, 2014 · 1 comment

Comments

@yingjieg
Copy link

{
    "text":"",
    "linkDescription": "",
    "action": {
            "text": "Open the action window",
            "url": "",
            "context" : {
                "key1": "value1",
                "key2": "value2"
            }
     }
 }
TileAction action = new TileAction();
action.setContext(String);

context under action is a object, I tried to call the method like below:

action.setContext("{\"key1\":\"value1\", \"key2\": \"value2\"}")

but the json will be parsed as "context" : "{"key1":"value1", "key2": "value2"}", I use a workaround here temporarily,

action.setContext(new ObjectMapper().readValue("{\"key\":\"value\"}", Object.class));

and change the type of context to object.

I might call the action.setContext(String) in a wrong way, Do you have any suggestion about this?

@ryanrutan
Copy link
Member

Do a git pull and see if that helps. I changed the type to a Map<String,String> as it should be. Thanks for the catch =)

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

2 participants