Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g-andrade/yabko
Erlang parser of Apple Property Lists (.plist)
https://github.com/g-andrade/yabko
apple elixir erlang plist property-lists
Last synced: about 1 month ago
JSON representation
Erlang parser of Apple Property Lists (.plist)
- Host: GitHub
- URL: https://github.com/g-andrade/yabko
- Owner: g-andrade
- License: mit
- Created: 2017-10-09T23:19:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-09T19:18:38.000Z (over 2 years ago)
- Last Synced: 2024-09-19T01:58:24.228Z (about 2 months ago)
- Topics: apple, elixir, erlang, plist, property-lists
- Language: Erlang
- Homepage:
- Size: 65.4 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# yabko
**This library is not under active maintenance; if you'd like to perform
maintenance yourself, feel free to open an issue requesting access.**[![](https://img.shields.io/hexpm/v/yabko.svg?style=flat)](https://hex.pm/packages/yabko)
[![](https://github.com/g-andrade/yabko/workflows/build/badge.svg)](https://github.com/g-andrade/yabko/actions?query=workflow%3Abuild)`yabko` is an Erlang parser of Apple Property Lists (.plist)
### Decodable data types
- boolean
- null (binary format)
- integer
- real
- date
- uid
- binary data
- latin1 text (binary format)
- utf16 text (binary format)
- utf8 text (XML format)
- arrays
- sets (binary format; untested)
- dictionaries### Example Usage
$ make console
``` erlang
% 1> {ok, XmlEncoded} = file:read_file("test_data/doc_example.xml").
{ok,<<"\n>}% 2> yabko:decode(XmlEncoded).
{ok,#{<<"Codswallop ratio">> => 3.14159265359,
<<"Date of birth">> => {{1973,2,12},{9,18,0}},
<<"Name">> => <<"John Doé"/utf8>>,
<<"Owned foobars">> => 4321,
<<"Pocket contents">> =>
[42,<<"Lorem ipsum">>,{uid,123456}]}}% 3> {ok, BinEncoded} = file:read_file("test_data/float32.bin.plist").
{ok,<<98,112,108,105,115,116,48,48,209,1,2,89,101,116,99,
32,101,116,99,46,46,34,63,128,0,0,8,...>>}% 4> yabko:decode(BinEncoded)
{ok,#{<<"etc etc..">> => 1.0}}
```Yabko is an independent project and has not been authorized, sponsored,
or otherwise approved by Apple Inc.