# Does there exist standardized language-agnostic data structure notation?

I wonder if there exists language-agnostic data structure notation. Preferably a standard, allowing to describe data structures and basic data types. e.g. something like a subset of WebIDL.

A motivation is to describe data structures (a model) in a way that is standardized and language-agnostic. Then have a set of mappings of those data structures into various representations (XML, JSON, YAML)

• (XML doesn't exclude (programming) language agnostic in my book.) – greybeard Sep 9 '20 at 6:32
• @greybeard Thank you, but the question is not about XML capabilities. Let's suppose I want to use XML to represent just data. – Filip Sep 10 '20 at 16:47

In terms of notation:

• Isn't XSD exactly what you are looking for? (barring all the "severe criticism" ...). Also not sure if you are looking for a notation convenient to hand-write, that's certainly NOT XML :-).
• Typedefs and preserves seem to have more of a mathematical basis, perhaps closer to what you are looking for. A related HN thread.

I suspect you already know a lot of these projects, usually the focus is in serialization:

Investigating this space I found Arrow, "a language-independent columnar memory format" for sharing memory between programs, with libraries for a dozen of languages. Turns out it uses flatbuffers under the hood.

Now that I came up with this list and I suspect you may be familiar with a lot of them, perhaps will be useful to know in which way the thing you are looking for is different. I think the keyword "notation" on your question is the key.

Cheers!

• That's a great summary! Thank you. – Filip Nov 26 '20 at 10:11