dfvfs.serializer package

Submodules

dfvfs.serializer.json_serializer module

The JSON serializer object implementation.

class dfvfs.serializer.json_serializer.JsonPathSpecSerializer[source]

Bases: PathSpecSerializer

JSON path specification serializer object.

classmethod ReadSerialized(json_string)[source]

Reads a path specification from serialized form.

Parameters:

json_string (str) – JSON serialized path specification.

Returns:

a path specification.

Return type:

PathSpec

classmethod WriteSerialized(path_spec_object)[source]

Writes a path specification to serialized form.

Parameters:

path_spec_object (PathSpec) – a path specification.

Returns:

JSON serialized path specification.

Return type:

str

dfvfs.serializer.serializer module

The Virtual File System (VFS) serializer object interfaces.

class dfvfs.serializer.serializer.PathSpecSerializer[source]

Bases: object

Path specification serializer interface.

abstract ReadSerialized(serialized)[source]

Reads a path specification from serialized form.

Parameters:

serialized (object) – serialized form of the path specification.

Returns:

a path specification.

Return type:

PathSpec

abstract WriteSerialized(path_spec)[source]

Writes a path specification to serialized form.

Parameters:

path_spec (PathSpec) – a path specification.

Returns:

serialized form of the path specification.

Return type:

object

Module contents