json Module¶
Dump objects to JSON.
-
class
knittingpattern.Dumper.json.JSONDumper(on_dump)[source]¶ Bases:
knittingpattern.Dumper.file.ContentDumperThis class can be used to dump object s as JSON.
-
__init__(on_dump)[source]¶ Create a new JSONDumper object with the callable on_dump.
on_dump takes no arguments and returns the object that should be serialized to JSON.
-
knitting_pattern(specification=None)[source]¶ loads a
knitting patternfrom the dumped contentParameters: specification¶ – a ParsingSpecificationorNoneto use the default specification
-