Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Latest commit

 

History

History
47 lines (35 loc) · 763 Bytes

File metadata and controls

47 lines (35 loc) · 763 Bytes

JONF parser/formatter in Python

Warning

JONF.py draft is archived in favor of TTT - please check it.

NOTE: This is an early alpha version

  • JONF format docs
  • Formatter is implemented and tested
  • Parser is not implemented yet
  • Python example:
# pip install jonf

import jonf, textwrap

text = textwrap.dedent(
    """\
    compare =
      - true
      = true
    """
).rstrip()

data = {
    "compare": [
        "true",
        True,
    ]
}

# TODO:
# assert jonf.parse(text) == data

assert jonf.format(data) == text

print(jonf.format(data))

Output:

compare =
  - true
  = true