bleis-tift / fsyaml Goto Github PK
View Code? Open in Web Editor NEWTyped Yaml Library for F#
Home Page: http://bleis-tift.github.com/FsYaml
License: Other
Typed Yaml Library for F#
Home Page: http://bleis-tift.github.com/FsYaml
License: Other
Assertion Violated: オブジェクトをYamlの文字列にできる
1. Expect: "FieldA:
- 1
- 2
- 3
FieldB:
1: 2
100: 200
200: 400
500: 1000
FieldC: "abc\r\ndef"
FieldD:
FieldA: []
FieldB:
400: 200
500: 250
FieldC: "abcdefghijk"
FieldD: null
"
Actual: "&1003054072 FieldA:
- &938613474 1
- &80681582 2
- 3
&246422342 FieldB:
1: 2
100: &719991411 200
200: &916642585 400
&1731350501 500: 1000
&245903467 FieldC: "abc\r\ndef"
&1224614361 FieldD:
FieldA: []
FieldB:
400: 200
500: 250
FieldC: "abcdefghijk"
FieldD: null
"
開発で使用していた3.5.1では発生しない
YAMLのタグを使って、判別共用体のケース識別子をYAMLの中に埋め込む?
DateTimeとTimestampに対応したい
type t = Case1 | Case2 of int list
- Case1
- Case2: [ 42 ]
これをパースすると、t list
が得られるはず。
すみません、見落としてました。
I'd appreciate if new version of NuGet package was released :)
出来ればScalar Typeとしてやりたい。カッコで囲んだカンマ区切り形式が今のところよさそう?
あと、判別共用体周りも似たような感じにできれば、より手軽に使えそう。
[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int | Piyo of string
- 1 # Hoge
- "piyo" # Piyo
[<値の型が違えば名前は省略できる属性>]
// 要素の順番で解決する
type t = Hoge of int * string | Piyo of string list
- [ 1, "hoge" ] # Hoge
- [ "2", "piyo" ] # Piyo
[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int * string | Piyo of int * int * int
- [ 1, "hoge" ] # Hoge
- [ 1, 2, 3 ] # Piyo
[<値の型が違えば名前は省略できる属性>]
type t = Hoge of int list | Piyo of string list
- [ 1, 2, 3 ]
- [ "a", "b", "c" ]
I propose adding a new function:
let eitherLoad<'a> yamlStr =
try
Choice2Of2(Yaml.load<'a> yamlStr)
with e -> Choice1Of2 e
this way it's possible to see what goes wrong when parsing your YAML
In file FsYaml/FsYaml.Tests/YamlScenario.fs at line 53 method name
[ 10 ,2,3 ]というYAML文字列を[1; 2; 3]に変換できる
should be
[ 10 ,2,3 ]というYAML文字列を[10; 2; 3]に変換できる
C#プロジェクトで使うには、的なものもあるといいかも
APIはそのままに、全体的に構成を見直す
の2つに分けるパターンと
AST導入
の2パターンを試して、分かりやすい方を採用する。
The path to the Resources.resx
seems to be hardcoded.
This happens when I try the short example from: http://bleis-tift.github.io/FsYaml/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.