Registry / serialization / archieml

archieml

JSON →
library0.3.5jsnpmunverified

ArchieML is a lightweight markup language designed for structured text data, frequently employed in journalistic workflows to transform content from Google Documents into machine-readable formats. This JavaScript parser, `archieml-js`, translates ArchieML documents (strings) into JavaScript objects. The current stable version is 0.5.0. Releases for `archieml-js` are typically driven by updates to the external ArchieML specification rather than a fixed time cadence. Its key differentiators include its minimalistic syntax, focus on structured data, and particular utility in pre-processing Google Docs content for data extraction. The library provides a single, straightforward `load` function for parsing ArchieML strings.

npm install archieml
INSTALL
IMPORT
SIG · ARCHIEML
A
archieml
serializationjavascriptv0.3.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

archieml
import archieml from 'archieml';
const archieml = require('archieml');
For modern ESM environments. The library exports a default object containing the `load` method.
archieml
const archieml = require('archieml');
import archieml from 'archieml';
Standard CommonJS import pattern, common in Node.js applications prior to ESM adoption.
archieml (global)
<script src="archieml.js"></script> <script>var parsed = archieml.load('key: value');</script>
When included directly in a browser via a `<script>` tag, `archieml` becomes a global object.

Demonstrates basic parsing of an ArchieML string into a JavaScript object, including how to enable deprecated inline comments.

const archieml = require('archieml'); const archieMLDocument = ` title: My Awesome Document author: John Doe date: 2026-04-19 # Introduction This is an introductory paragraph. It spans multiple lines. .sections[] section: First Section content: This is the content for the first section. section: Second Section content: This is the content for the second section. A multi-line value for content. .contact name: Jane Smith email: jane@example.com comments_example: This should be a value [comment that will be ignored by default] `; // Basic usage const parsedDocument = archieml.load(archieMLDocument); console.log('Parsed Document (default behavior):'); console.log(JSON.stringify(parsedDocument, null, 2)); // Usage with inline comments enabled (deprecated, but still supported with option) const parsedWithComments = archieml.load(archieMLDocument, { comments: true }); console.log('\nParsed Document (with comments enabled):'); console.log(JSON.stringify(parsedWithComments, null, 2));
Debug
Known issues
deprecatedInline comments were deprecated in ArchieML specification and are disabled by default in `archieml-js` versions >=0.3.0.
fix
To continue using inline comments, pass `{ comments: true }` as the second argument to the `load` function: `archieml.load(doc, { comments: true });`
affects: >=0.3.0
breakingIn `v0.2.0`, the behavior for arrays defined multiple times changed. Secondary definitions now replace previous definitions, rather than 'reopening' and appending to the original array.
fix
Review ArchieML documents for arrays with duplicate keys and adjust document structure or parsing expectations accordingly, as previous values will be overwritten.
affects: >=0.2.0
breakingAs of `v0.2.0`, `:skip` blocks placed inside a multi-line value will now break up the value, causing only the text *before* the `:skip` block to be stored.
fix
Ensure `:skip` blocks are not inadvertently placed within multi-line values, or modify documents to explicitly break values if `:skip` is intended to truncate.
affects: >=0.2.0
gotchaThe `archieml-js` parser adheres closely to the external ArchieML specification. Changes or clarifications in the official spec can lead to subtle shifts in parsing behavior, even between minor or patch versions of `archieml-js`.
fix
Always consult the official ArchieML specification (archieml.org) when designing or troubleshooting ArchieML documents to understand the expected parsing rules for a given version.
affects: All versions
Errors
Common errors & fixes
My inline comments are not being parsed or are included in the value string.
Inline comments were deprecated and are disabled by default since v0.3.0.
fix
Enable comment parsing by passing an options object to the `load` function: `archieml.load(yourAmlString, { comments: true });`
Array redefinition overwrites previous values unexpectedly.
Since v0.2.0, re-defining an array key replaces its previous definition, instead of appending to it.
fix
This is the intended behavior since v0.2.0. If you need to append to an array, ensure distinct keys or structure your ArchieML to reflect overwriting behavior.
ReferenceError: archieml is not defined
Attempting to use `archieml` without proper import/inclusion for your JavaScript environment (e.g., in a browser without `<script>` tag, or in an ESM module without `import`).
fix
For CommonJS, use `const archieml = require('archieml');`. For ESM, use `import archieml from 'archieml';`. For browsers, include `<script src="archieml.js"></script>` and ensure the `archieml` global is available before use.
Upgrade
Version history
0.3.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
archieml — npm install archieml · libregistry