yabko (yabko v1.1.0)

Copy Markdown View Source

A parser of Apple Property Lists (.plist).

Both the XML and the binary (bplist) encodings are decoded through the single entry point decode/1.

Summary

Types

A decoded property list value.

Functions

Decode an encoded property list.

Types

int64()

-type int64() :: -9223372036854775808..9223372036854775807.

object()

-type object() ::
          undefined |
          boolean() |
          int64() |
          float() |
          calendar:datetime() |
          {uid, uint64()} |
          [object()] |
          #{binary() => object()}.

A decoded property list value.

uint64()

-type uint64() :: 0..18446744073709551615.

Functions

decode(Data)

-spec decode(Data) -> {ok, DecodedObject} | {error, Error}
                when
                    Data :: iodata(),
                    DecodedObject :: object(),
                    Error :: {exception, atom(), term(), [term()]}.

Decode an encoded property list.

Data may hold either the XML or the binary (bplist) representation; the format is detected automatically. Returns {ok, DecodedObject} on success or {error, {exception, Class, Reason, Stacktrace}} if decoding raised.