[Java] Add JSON-patch support to other Java API clients (#5808)

* add JSON-patch support to other Java API clients

* minor fix to java jersey1 json check
This commit is contained in:
wing328
2017-06-09 21:46:40 +08:00
committed by GitHub
parent 53bd931f5c
commit 7cddd17acc
13 changed files with 14 additions and 7 deletions

View File

@@ -438,7 +438,7 @@ public class ApiClient {
*/
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && mime.matches(jsonMime);
return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
}
/**