LoginSignup
8
6

More than 5 years have passed since last update.

edn(extensible data notation)を使う

Last updated at Posted at 2014-11-21

ednとは

google翻訳

EDNは、拡張可能なデータ表記法である。 EDNのスーパーセットは、プログラムを表現するためのClojureによって使用され、それはDatomicとデータ転送フォーマットのような他のアプリケーションによって使用される。この仕様は、他の言語でのリーダーとライターの実装を容易に助け、他の用途のためにするために、それらと他の特定のユースケースからの単離にEDNについて説明します。

そんな感じ。

edn読込

config.edn
{"結城友奈は勇者である" "test"
 "天体のメソッド" "天メソ"}
(:require [clojure.edn :as edn])

で、

(edn/read-string (slurp "config.edn"))

を使って読み込んでやれば良い。

簡単簡単。

edn.png

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6