I am creating an object from JSON that has a String[] property, so the JSON looks like this:
{
key1: "val1",
key2: ["val2a", "val2b", "val2c"],
}
What's the best way to define this as a JavaScriptObject?
Right now I am defining a new object JSString, so the java object looks like this:
public class MyObject extends JavaScriptObject {
...
public JSArray<JSString> getKey2() {...
}
This is kinda annoying. It'd be nice if I could do this:
public class MyObject extends JavaScriptObject {
...
public String[] getKey2() {...
}
But that doesn't work. Is there a better way? Thanks in advance