Skip to content

Commit cf558a3

Browse files
committed
add details for JiK and XiK
1 parent 8ec1837 commit cf558a3

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<section class="kdl-section" id="compatibility-with-json-and-xml">
2+
3+
## Compatibility with JSON and XML
4+
5+
There are two specifications for writing KDL that can be losslessly translated
6+
between it and JSON or XML. These specifications define a stricter _subset_ of
7+
KDL that, even if not entirely idiomatic, is still valid and fits into the
8+
data models of the other two languages:
9+
10+
* [JSON in KDL](https://github.com/kdl-org/kdl/blob/main/JSON-IN-KDL.md)
11+
* [XML in KDL](https://github.com/kdl-org/kdl/blob/main/XML-IN-KDL.md)
12+
13+
</section>
14+

src/_includes/partials/faq.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
## FAQ
44

5-
#### How do you pronounce "KDL"?
5+
#### How do you pronounce KDL?
66

77
Same as "cuddle".
88

9-
#### What is the expected file extension?
10-
11-
A file containing KDL should end with `.kdl`.
12-
139
#### Why yet another document language?
1410

1511
Because nothing out there felt quite right. The closest one I found was
@@ -68,6 +64,10 @@ forgiving syntax without being so flexible as to allow certain classes of
6864
unfortunate mistakes. It also has much more flexibility around how to
6965
represent data.
7066

67+
If you need to interoperate with a service that consumes or emits JSON, or for
68+
some other reason have need to write "JSON in KDL", [we have JiK, an official
69+
microsyntax for losslessly encoding JSON](https://github.com/kdl-org/kdl/blob/main/JSON-IN-KDL.md).
70+
7171
#### What about TOML?
7272

7373
It nests very poorly. It doesn't fare well with large files.
@@ -95,4 +95,9 @@ Finally, KDL is **not** a markup language. XML or HTML do a much better job of
9595
useful for templating engines that want to be more strict about text
9696
fragments.
9797

98+
If you need to interoperate with a service that consumes or emits XML, or for
99+
some other reason have need to write "XML in KDL", [we have XiK, an official
100+
microsyntax for losslessly encoding XML](https://github.com/kdl-org/kdl/blob/main/XML-IN-KDL.md).
101+
102+
98103
</section>

src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ title: The KDL Document Language
1313
{% include partials/implementations.md %}
1414
{% include partials/design-and-discussion.md %}
1515
{% include partials/design-principles.md %}
16+
{% include partials/compatibility-with-json-and-xml %}
1617
{% include partials/faq.md %}

0 commit comments

Comments
 (0)