module documentation
Serialize typegraphs into JSON. Usage: from pytype.typegraph import typegraph_serializer s = typegraph_serializer.encode_program(ctx.program) p = typegraph_serializer.decode_program(s) You can also call `json` methods directly, using `TypegraphEncoder` and `object_hook`: import json from pytype.typegraph import typegraph_serializer s = json.dumps(ctx.program, cls=typegraph_serializer.TypegraphEncoder) p = json.loads(s, object_hook=typegraph_serializer.object_hook) We are not interesting in deserialization into a usable cfg.Program. If you want to use the Program for your own needs later, use pytype as a library.
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Implements the JSONEncoder behavior for typegraph objects. |
Function | decode |
Undocumented |
Function | encode |
Undocumented |
Function | object |
An object hook for json.load that produces serialized CFG objects. |
Function | to |
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Function | _decode |
Undocumented |
Constant | _TYP |
Undocumented |
Undocumented
Value |
|