Is there a documented AST structure for common mark. JSON or XML

I’ve been reading the common mark spec and I see much mention of parsing to an AST but not actual documentation of an AST. Does one exist?

I am writing an application where messages in markdown are sent. I would like to save the messages in the DB as their tokenised AST. I want to do this so that we can query saved messages by the content in them, like number of links, or links to a particular origin.

Closest thing we have is the spec itself (which is
specified in terms of abstract elements, though the
examples are in HTML). There is also the DTD:

1 Like