{"id":23979523,"url":"https://github.com/megahomyak/nxml","last_synced_at":"2025-07-09T15:31:15.628Z","repository":{"id":65220186,"uuid":"584407582","full_name":"megahomyak/nxml","owner":"megahomyak","description":"A parser for NXML (NXML is not XML!)","archived":false,"fork":false,"pushed_at":"2023-04-27T18:12:04.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T08:13:50.810Z","etag":null,"topics":["parser"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/megahomyak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-02T13:35:29.000Z","updated_at":"2023-06-07T12:30:00.000Z","dependencies_parsed_at":"2023-02-17T04:30:22.095Z","dependency_job_id":null,"html_url":"https://github.com/megahomyak/nxml","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahomyak%2Fnxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahomyak%2Fnxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahomyak%2Fnxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahomyak%2Fnxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/megahomyak","download_url":"https://codeload.github.com/megahomyak/nxml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240557484,"owners_count":19820360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser"],"created_at":"2025-01-07T09:55:25.221Z","updated_at":"2025-02-24T21:10:37.624Z","avatar_url":"https://github.com/megahomyak.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NXML\n\nNXML is a markup language that is **not XML**. It was based on XML, but went in a very different direction and now does not resemble XML at all.\n\n## Why is this a decent language\n\n* Simpler than JSON\n* Can be losslessly decoded and encoded using this library\n* Very flexible and concise at the same time\n* Escape sequences are concise (just `\\` and your character), not some incomprehensible bullshit like those in XML\n\n## Why there are no built-in types (apart from sequences and strings)\n\nWhen was the last time you've been working with structures that required you to interpret them differently based on types of some of their fields? Never? Well, me too, and that's the reason.\n\n## Syntax explanation\n\n* A node is either a text (`hello`) or a sequence (`[I|am|a|sequence]`)\n* Brackets (`[` and `]`) surround the sequence\n* Nodes can go one after another without any explicit delimiters (`text[sequence][sequence]text`)\n* A vertical bar (`|`) denotes the end of a text node (otherwise text nodes end at the end of input or at a sequence boundary (a bracket)). This can be used to place text nodes one after another or to create an empty text node\n* Every special character (`|`, `[`, `]` or `\\`) can be escaped with a backslash (`\\`)\n\n## Syntax grammar (in pseudo-Backus-Naur Form; may be invalid)\n\n    special_character ::= \"[\" | \"]\" | \"|\" | \"\\\\\"\n    text_character ::= !special_character | \"\\\\\\\\\" | \"\\\\[\" | \"\\\\]\" | \"\\\\|\"\n    text ::= text text_character | text_character | text \"|\" | \"|\"\n    sequence_of_nodes ::= sequence_of_nodes node | node\n    node ::= text | \"[\" + sequence_of_nodes + \"]\" | \"[]\"\n\n## Syntax example\n\n    [to-do list|\n        [buy some groceries|[\n            lettuce |\n            cucumber |\n            ketchup\n        ]]\n        [finish NXML|[\n            add syntax explanation to the README |\n            update syntax examples |\n            rewrite the parser\n        ]]\n        [do the homework]\n    ]\n\n\n    [user|\n        [id|123]\n        [name|Paul]\n        [surname|Brown]\n        [profession|Architect]\n        [friend ids|[234|345|456]]\n    ]\n\n\n    [\n        [message|\n            [from|Alice]\n            [to|Bob]\n            [contents|Hello!]\n        ]\n        [message|\n            [from|Bob]\n            [to|Alice]\n            [contents|Hi!]\n        ]\n    ]\n\n\n    [ARTICLE|\n        [TITLE|Cookies are good]\n        [CONTENTS|\n            [PARAGRAPH|\n                [OUTER REFERENCE|[URL|https://en.wikipedia.org/wiki/Cookie][TEXT|Cookies]] are good!\n            ]\n        ]\n    ]\n\n\n    you can use the sequential parser to parse bare sequential nodes |\n    something |\n    something\n\n\n    an empty text node! -\u003e || \u003c- here it is!\n    another one, this time inside a sequence: [|] (it is between the opening bracket and the vertical bar)\n\n## Things to consider when using this library\n\n* This library **does not** trim the whitespaces at the end or the beginning of text nodes for better flexibility. It is **the user's responsibility** to trim the excessive whitespaces.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahomyak%2Fnxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegahomyak%2Fnxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahomyak%2Fnxml/lists"}