5

Is there a mature and stable YAML library for Erlang that someone has actually used? I can't seem to find one anywhere

Update: I have searched and searched and still not found one

yazz.com
  • 57,320
  • 66
  • 234
  • 385

3 Answers3

4

Yamler seems like a good library.

cashmere
  • 2,811
  • 1
  • 23
  • 32
3

There is an incomplete implementation of YAML parsing in Erlang beanstalk client library.

gleber
  • 4,392
  • 1
  • 26
  • 28
  • Thanks, it seems to be able to parse basic YAML which is good. – yazz.com Mar 07 '10 at 19:04
  • I'll keep searching for one which can also edit the parsed tree and generate YAML from it. – yazz.com Mar 07 '10 at 19:05
  • Your right, I should implement one, but I'll admit I am not really a very good developer and I dont have the first clue as to how to go about implementing this – yazz.com Mar 08 '10 at 20:58
  • 1
    It's the middle of 2011 and still no serious yaml implementation for Erlang. My work-around was to use python and pyyaml to load the yaml file, print it as an erlang term and then have erlang parse that. An idea for a real erlang yaml parser would be to wrap libyaml with NIFs. This would only provide an event stream; another layer would need to be written on top of that (probably in pure erlang) to form a nice structured erlang term. – goertzenator Jun 30 '11 at 16:54
2

Check https://github.com/yakaz/yamerl

  • It's pure erlang - no NIFs or external dependencies
  • It's updated reqularly as needed (look at the commit history)
  • Testcases
  • Supports YAML 1.2
erlanger
  • 21
  • 1
  • have you ever tried this? I tried and found it can't work. I run this `yamerl_constr:string("Hello World!").` and it shows some erorrs,I use R15 version. – sherlock Dec 09 '15 at 03:21
  • @sherlock: You need to start the `yamerl` application first: `application:start(yamerl), yamerl_constr:string("Hello World!"). % Returns ["Hello World!"]` – Jean-Sébastien Pédron Oct 29 '16 at 23:33