MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _json_decode

Function _json_decode

lib/matplotlib/font_manager.py:1142–1156  ·  view source on GitHub ↗
(o)

Source from the content-addressed store, hash-verified

1140
1141
1142def _json_decode(o):
1143 cls = o.pop('__class__', None)
1144 if cls is None:
1145 return o
1146 elif cls == 'FontManager':
1147 r = FontManager.__new__(FontManager)
1148 r.__dict__.update(o)
1149 return r
1150 elif cls == 'FontEntry':
1151 if not os.path.isabs(o['fname']):
1152 o['fname'] = os.path.join(mpl.get_data_path(), o['fname'])
1153 r = FontEntry(**o)
1154 return r
1155 else:
1156 raise ValueError("Don't know how to deserialize __class__=%s" % cls)
1157
1158
1159def json_dump(data, filename):

Callers

nothing calls this directly

Calls 5

FontEntryClass · 0.85
joinMethod · 0.80
popMethod · 0.45
__new__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…