Uniform eXchange Format (UXF) is a plain text human readable optionally typed storage format that supports custom types.
UXF is designed to make life easier for software developers and data designers. It directly competes with csv, ini, json, toml, and yaml formats. A key advantage of UXF is its support for custom (i.e., user-defined) types. This can result in more compact, more readable, and easier to parse data. And in some contexts it may prove to be a convenient alternative to sqlite or xml.
Every Uxf
object contains one value
of type Value
: this is always a
collection (a List
, Map
, or Table
), which may be empty or
contain any number of other values—any mix of scalars and collections.
For details of the Uniform eXchange Format (UXF) supported by this library, see the UXF Overview. (Alternative link to UXF Overview.)
The uxf tool can read UXF files (optionally gzip compressed) and lint and output UXF files (optionally gzip compressed; optionally replacing imports and dropping unused ttypes). It can also compare two UXF files for equality or equivalence. (For a full diff, format the two files with the same format options, and use a standard diff tool.)
Suggestions, comments, and pull requests for this library are welcome.
Especially useful would be ideas on how to improve the APIs to improve usability.
In this library Uxf
objects and all the Value
s they contain are owned
(like String
); would it be possible/desirable to have an unsized type
(like str
)?
Value::naturalize()
function to public API. Various minor
doc improvements.NamedRecord
type.push_t()
and push_many()
convenience methods. Added
first_named()
, first()
, and similar methods to Table
.-D|--decimals
to the command line and improved the CLI.
Breaking change: the Format
type now has realdp
as u8
rather than
Option<u8>
: to fix replace None
with 0
and Some(n)
with n
.Uxf::value_mut()
.Uxf::add_tclass()
.Value::Null
rather than Option<Value>
since this better
represents UXF data.