I prefer less verbose form... but it's just a matter of preference:
jsonQuery.put("fields", fieldNames.isEmpty() ? new JSONArray() : Joiner.on(",").join(fieldNames));