https://github.com/paulmooreparks/Xfer Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} paulmooreparks / Xfer Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 3 An experimental data-transfer language. License MIT license 3 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights paulmooreparks/Xfer master BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 33 Commits ParksComputing.Xfer ParksComputing.Xfer xferc xferc .gitattributes .gitattributes .gitignore .gitignore LICENSE.txt LICENSE.txt README.md README.md Xfer.sln Xfer.sln sample.xfer sample.xfer spec.xfer spec.xfer View all files Repository files navigation * README * MIT license Xfer Xfer is a data-serialization language that is designed to be a more flexible and more strictly-typed alternative to JSON. This project is still in its infancy and is quite experimental. As it becomes a bit more concrete I'll add more details here. The code you'll find in this repository is also experimental. So far, I've built an object model, a parser, and a serialization/ deserialization class as part of my .NET Xfer Library, but at the moment this code is completely not ready for prime time. It's not even thread safe yet! About once a week I'll completely refactor everything, so don't get terribly attached to anything you see here. However, if you do like some of the ideas, please let me know. I'm always open to feedback. That said, I do plan to make the code professional-grade in the future, and I want to add implementations in other languages (Rust, C++, JavaScript, and TypeScript are on my list). If you want to contribute, please let me know. I'd love to have your help. What Is the Purpose of Xfer? As alluded to at the top of this document, the purpose is to provide an alternative to JSON that offers the following features (among others): * Nested elements * Comments * Strict typing * Metadata * Placeholder substitution Nested Elements In Xfer, elements are delimited by angle brackets (< and >) and element-specific marker characters (such as !, /, :, ", and so on). Nesting of elements is accomplished by repeating the marker character in the outer element as many times as necessary to disambiguate the inner elements. , //> <"""and a string can contain <""another string which <"contains another string">"">."""> Comments Xfer documents may contain comments that are ignored by the parser. Comments may also be embedded in other elements, including other comments. , //> <: key <"value"> :> Strict Typing While JSON builds on JavaScript's loose typing, Xfer is strictly typed. <"Hello, World!"> <~true~> <#42#> <#$2A#> <#%00101010#> <&5000000000&> <&$BAADF00D&> <# %10101010 #> <^3.1415926535^> <*123.45*> <\65\> <\$41\> <\%01000001\> <\nl\> <\tab\> <@2019-01-01T00:00:00@> <_Inner elements <"are evaluated"> <#1#> at a time and<\$20\>rendered<\$20\><__as<\$20\>is__>._> <_<|USERPROFILE|>_> <#<|NUMBER_OF_PROCESSORS|>#> element is a key/value pair, which consists of either an alphabetic keyword or a text element followed by a value element. /> <: name <"Paul"> :> <: age <#$36#> :> <: location <"Singapore"> :> <[ <#1#> <#2#> <#3#> ]> <[ <&1&> <&2&> <&3&> ]> <: object <{ <:key <"value">:> <: boolean <~false~> :> }> :> <( <"value"> <#123#> <~true~> <@2019-01-01@> )> Metadata Xfer documents can contain metadata that is not part of the data itself. This metadata can be used for a variety of purposes, such as defining the version of Xfer that the document conforms to and other information that may be useful to the parser or the consumer of the data. <@ <: version <"1.0"> :> <: message_id <"5D3208CB-77EC-4BC4-A256-97AD296BBEF7"> :> <: ttl <#3600#> :> <: description <"This is a sample document."> :> @> Placeholder Substitution Xfer documents may contain placeholders that are replaced with values at runtime. <: message <"Hello, <|USER|>!"> :> Xfer and JSON Compared Here's a simple example of a JSON document: { "name": "Alice", "age": 30, "isMember": true, "scores": [85, 90, 78.5], "profile": { "email": "alice@example.com", "joinedDate": "2023-01-15T12:00:00" } } Following is the equivalent Xfer document. Notice the explicit, rather than implicit, data types. <{ <: name <"Alice"> :> <: age <#30#> :> <: isMember <~true~> :> <: scores <[<*85*> <*90*> <*78.5*>]> :> <: profile <{ <: email <"alice@example.com"> :> <: joinedDate <@2023-01-15T12:00:00@> :> }> :> }> About An experimental data-transfer language. Resources Readme License MIT license Activity Stars 3 stars Watchers 1 watching Forks 0 forks Report repository Releases No releases published Packages 0 No packages published Languages * C# 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.