No activity today, make something!
tiddlyweb serializer

20160313195420 cdent  

A serializer is a class in TiddlyWeb that implements the SerializationInterface for the serialization of tiddler, bag and recipe data.

By default, TiddlyWeb provides the following formats:

TiddlyWebWiki provides:

Additional serializers can be added by using plugins and adjusting tiddlywebconfig.py.

The job of a serializer is twofold:

  1. Take an object representing a TiddlyWeb resource and turn it into a string of some form (e.g. JSON).
  2. Take a string of some form and use that string to fill in an object representing a TiddlyWeb resource.

In web requests a serializer is used to turn an object or collection of objects to a string when there is a GET request and a string to an object when there is a PUT request. The GET asks the server for a representation of a resource. The PUT request sends a representation to replace an existing resource. Note that replace is the correct word here, not update.

In the text store that comes with TiddlyWeb, the text serializer is used when reading and writing some entities to and from disk.

''A serializer should never be called directly by TiddlyWeb plugin code.'' Instead a serializer is produced by a factory class called Serializer in tiddlyweb/serializer.py.

See also: