Make `AbstractCapabilities` implement `toJson`
The capabilities subclasses were the only thing using `asMap`
for serialisation to JSON. Everywhere else, we use `toJson`.
Might as well make it consistent.
@@ -102,6 +102,10 @@ protected void setCapability(String key, Object value) {
return Collections.unmodifiableMap(caps);
}
+ public Map<String, Object> toJson() {
+ return asMap();
+ }
+
/**
* Subclasses can use this to add information that isn't always in the capabilities map.
*/
