Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/org/minima/system/commands/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -507,23 +507,21 @@ public static Command getCommand(String zCommand) {
comms.getParams().put(name, json);

}else if(value.startsWith("[") && value.endsWith("]")) {


//Is this a state variable
if(command.equals("txnstate")) {

//Could be a String variable.. add normal String parameter to..
comms.getParams().put(name, value);

continue;
}
//It's a JSONArray..!
JSONArray json = null;
try {
json = (JSONArray) new JSONParser().parse(value);
} catch (ParseException e) {

//Is this a state variable
if(command.equals("txnstate")) {

//Could be a String variable.. add normal String parameter to..
comms.getParams().put(name, value);

continue;
}

//Otherwise is just a broken JSONArray

return new missingcmd(command,"Invalid JSON parameter for "+command+" @ "+token+" "+e.toString());
}

Expand Down