Docs
/
adapter system

a-json

JSON transformation capability pack: 23 structural transforms — camelCase keys, flatten, dedupe, group-by, filter, pluck, merge-with-defaults, path extraction, computed fields, conditional routing...

a-json (adapter system)

JSON transformation capability pack. Ported from leumas-middleware/lib/a.json — the pure core: 23 structural transforms. Stripped: express server.js, frontend/, public/, scripts/, and the infra helpers (adapterRegistry.js, runAdapter.js) that dynamically scanned the on-disk adapters folder.

The real helper functions are reused verbatim under ./helpers, and each source adapter is preserved under ./adapters/<name>/index.js (import paths rewritten to the co-located helpers). index.js imports each adapter's default export and exposes adapters[<id>] = (args) => <adapter>(args).

Tools (adapters)

toolargsresult
camelCaseKeysobject/arraykeys recased to camelCase
flattenNestednested objectdot-path-flattened object
dedupeByKeyarray or { data, key, strategy }de-duplicated array
groupByKey{ data, key }{ <keyValue>: [...] }
filterByValue{ data, key, value }filtered array
pluckKeys{ data, keysToPluck }projected array
mergeWithDefaults{ defaults, data }deep-merged object
pathExtractor{ data, paths }extracted values
computedFields{ data, computed }enriched rows
conditionalRouter{ data, rules }routed payload
currencyNormalizer / temporalNormalizer{ data, ... }normalized rows
geoEnricher / graphBuilder{ data, ... }enriched/graph output
secretScrubber{ data, keys }scrubbed payload
schemaComparator{ left, right }schema diff
validationHarness{ data, rules }validation report
sortAndPaginate{ data, options }page slice
eventAccumulator{ data, groupBy, metrics }aggregates
referenceResolver{ data, lookup, ... }resolved refs
binaryEncoder{ data, fields, format }encoded fields
aiPrompt{ data, template }built prompt
textAnalyzer{ data, field }text stats

(cloned_adapter in the source was an exact duplicate of camelCaseKeys and was dropped.)

Source shared/engines/adapters/domain/a-json/README.md (no-git)markdownjson
Generated from the Leumas repository. Every page cites the file it came from.leumas.techllms.txt