devicehive-java-server
devicehive-java-server copied to clipboard
JSON input parameter of type array
There are several places where DH accepts filtering requests, and some of them require user to pass arguments as an array, current implementation is not fully consistent through system, so it needs to be finalized and changed everywhere. On of examples is subscribing to notifications via websocket call.
For the client code it's much simpler to pass empty array, while sending null value or undefined creates ugly code, though logically server treats absence of field or field-value(null) as no filtering; on the other hand null values on server side can cause potential NPEs, while both null and empty array handling should look similar in java code.
Please see related items #101, #56.