MCPcopy Create free account
hub / github.com/comaps/comaps / to_json

Method to_json

tools/python/mwm/mwm_interface.py:290–303  ·  view source on GitHub ↗
(self, with_features=False)

Source from the content-addressed store, hash-verified

288 )
289
290 def to_json(self, with_features=False):
291 m = {
292 "name": self.name(),
293 "version": self.version().to_json(),
294 "type": self.type(),
295 "bounds": self.bounds().to_json(),
296 "sections_info": {k: v.to_json() for k, v in self.sections_info().items()},
297 "size": len(self),
298 }
299
300 if with_features:
301 m["features"] = [f.to_json() for f in self]
302
303 return m
304
305
306class Feature(ABC):

Callers 5

dump_mwmFunction · 0.95
find_and_print_featuresFunction · 0.45
to_jsonMethod · 0.45
to_jsonMethod · 0.45
to_jsonMethod · 0.45

Calls 5

nameMethod · 0.95
versionMethod · 0.95
typeMethod · 0.95
boundsMethod · 0.95
sections_infoMethod · 0.95

Tested by

no test coverage detected