// o is either a map already (string->object) or an arbitrary object, // in which case its fields are converted into a map. static Map objectAsMap(O o) { ret objectToMap(o); } // same for a collection (convert each element) static L> objectAsMap(Collection l) { ret objectToMap(l); }