Skip to content

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

@yingjieg

Description

@yingjieg
{
    "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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions