json
Module¶
Dump objects to JSON.
-
class
knittingpattern.Dumper.json.
JSONDumper
(on_dump)[source]¶ Bases:
knittingpattern.Dumper.file.ContentDumper
This 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 pattern
from the dumped contentParameters: specification¶ – a ParsingSpecification
orNone
to use the default specification
-