A program that converts JSON files to KDL
Go to file
Agatha Lovelace 8d953c6c54
Bump version to v0.2.0
2024-07-31 20:21:01 +02:00
examples Type annotation support & changed `identifier` to `name` 2024-07-31 11:30:14 +02:00
src Type annotation support & changed `identifier` to `name` 2024-07-31 11:30:14 +02:00
.gitignore Initial commit 2023-03-05 22:36:30 +01:00
Cargo.lock Bump version to v0.2.0 2024-07-31 20:21:01 +02:00
Cargo.toml Bump version to v0.2.0 2024-07-31 20:21:01 +02:00
LICENSE.md Initial commit 2023-03-05 22:36:30 +01:00
README.md Adapt to parse structure suggested in https://github.com/NixOS/nixpkgs/issues/198655#issuecomment-1985943125 2024-03-12 21:51:40 +01:00

README.md

json2kdl

json2kdl is a program that generates KDL files from JSON

json2kdl input.json output.kdl

Intended Use

json2kdl was made specifically for Nixpkgs Issue #198655, which means, these features are currently out of scope:

  • Parsing arbitrary JSON
    Currently, the input file structure must follow a specific schema:

    • Nodes can be defined as elements of the root JSON array ([])
    • Each node must have the identifier field of type Identifier and can have these optional fields:

    See examples/example.json

  • Comments (As JSON does not support them)

  • Type Annotations

  • Types that KDL has but JSON does not and vice versa