View Source SmeeFeds.Import (SmeeFeds v0.3.1)

Converts serialised federation data into the Federation structs used by SmeeFeds.

Please see the SmeeFeds.Export module too.

Summary

Functions

Parses the JSON string and returns a map of Federations.

Reads the specified filename and returns a map of Federations

Parses the JSON string and returns a list of Federations.

Reads the specified filename and returns a list of Federations

Functions

Link to this function

dd_json!(data, options \\ [])

View Source
@spec dd_json!(data :: binary(), options :: keyword()) :: map()

Parses the JSON string and returns a map of Federations.

This format is intended for use inside SmeeFeds as the default federation data. In most cases it is better to use Import.json! instead.

The JSON format is expected to be the same as that as SmeeFeds.Export.dd_json_file! and SmeeFeds.Export.dd_json!

Link to this function

dd_json_file!(filename, options \\ [])

View Source
@spec dd_json_file!(filename :: binary(), options :: keyword()) :: map()

Reads the specified filename and returns a map of Federations

This format is intended for use inside SmeeFeds as the default federation data. In most cases it is better to use SmeeFeds.Import.json_file! instead.

The JSON format is expected to be the same as that as SmeeFeds.Export.dd_json_file! and SmeeFeds.Export.dd_json!

@spec json!(data :: binary()) :: list()

Parses the JSON string and returns a list of Federations.

The JSON format is expected to be the same as that as Export.json_file! and Export.json!

@spec json_file!(filename :: binary()) :: list()

Reads the specified filename and returns a list of Federations

The JSON format is expected to be the same as that as SmeeFeds.Export.json_file! and SmeeFeds.Export.json!