-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* submodule docs are now located at /api/yaml/<name>.html instead of /api/<name>.html. * can now simply link to symbols in other modules. * fixed some links * fixed quickstart example list * added quickstart item displaying the new style api * fixed a bug in presenter that doubled a line in literal/flow style
- Loading branch information
Showing
15 changed files
with
175 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import yaml, yaml/style, streams | ||
|
||
type | ||
Strings = object | ||
first {.scalar: ssSingleQuoted.}: string | ||
second {.scalar: ssLiteral.}: string | ||
third {.scalar: ssDoubleQuoted.}: string | ||
|
||
Numbers {.collection: csFlow.} = object | ||
start, stop: int32 | ||
|
||
Root = object | ||
strings: Strings | ||
numbers: Numbers | ||
blockNumbers {.collection: csBlock.}: Numbers | ||
|
||
var root = Root( | ||
strings: Strings( | ||
first: "foo", second: "bar\n", third: "baz" | ||
), | ||
numbers: Numbers(start: 0, stop: 23), | ||
blockNumbers: Numbers(start: 23, stop: 42) | ||
) | ||
|
||
var s = newFileStream("out.yaml", fmWrite) | ||
Dumper().dump(root, s) | ||
s.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
strings: | ||
first: 'foo' | ||
second: | | ||
bar | ||
third: "baz" | ||
numbers: { | ||
start: 0, | ||
stop: 23 | ||
} | ||
blockNumbers: | ||
start: 23 | ||
stop: 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
… via style pragmas |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
… by customizing the Dumper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
… With variant objects | ||
… with variant objects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
… With the Sequential API | ||
… with the YamlStream API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.