Optional JSON-record input adapter backed by Nim's standard library.
A JSON table is an array of objects. Columns can be supplied explicitly or inferred as the stable union of keys in first-seen order.
Procs
proc tableFromJson(data: JsonNode; columns: openArray[string] = []; includeHeader = true; missingValue = ""; nullValue = ""): Table {. ...raises: [ValueError, KeyError], tags: [], forbids: [].}
-
Converts an array of JSON objects into a rectangular table.
If columns is empty, keys are inferred across every object in stable first-seen order. Missing keys and JSON nulls use their configured text.
proc tableFromJson(input: string; columns: openArray[string] = []; includeHeader = true; missingValue = ""; nullValue = ""): Table {. ...raises: [ValueError, KeyError, IOError, OSError, JsonParsingError], tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
- Parses JSON text and delegates to the JsonNode overload.
Exports
-
initTableMargin, draw, rotateCounterClockwise, CellAddress, initTable, build, removeRows, row, setSpan, isActive, psqlTheme, TableTheme, headerCell, replaceRow, or, Panel, footerSelector, setHeader, clearSpan, extractRows, percentageWidth, initColumn, setMaxRows, initCell, initShadow, setVerticalAlignment, footerCell, setAlignment, setPadding, headerSelector, BorderSet, addRow, addRow, OverflowMode, CellModifier, WidthConstraint, roundedTheme, predicateSelector, duplicateColumn, setTitle, contentWidth, setVerticalAlignment, initTableBuilder, addRow, fromRows, Column, Table, clearShadow, updateCell, allCellsSelector, setAlignment, initLiveTableOptions, TableBuilder, maxRows, replaceRow, splitColumns, startLive, LiveTableOptions, setAlignment, asciiTheme, colorBorders, setFooter, cell, duplicateRow, splitRows, print, transpose, cell, merge, highlight, LiveTableMode, addRow, clearFooter, finishRow, CellPadding, row, maximumWidth, addPanel, PanelPosition, verticalConcat, panel, cellSelector, setVerticalAlignment, fixedWidth, horizontalConcat, borderlessTheme, setPadding, VerticalAlignment, renderFrame, column, clearTitle, rotate180, addCell, apply, addRow, Row, minimumWidth, Selector, Shadow, column, clearHeader, rotateClockwise, CellPredicate, matchingCells, initCellPadding, TableSection, LiveTable, columnSelector, initTable, rowSelector, pad, markdownTheme, columnCount, alignVertical, stopLive, align, Cell, removeColumns, extractColumns, WidthKind, renderToTerminalWidth, CellContext, customTheme, render, initRow, segmentSelector, setWidthPriority, setPadding, modernTheme, TableMargin, initLiveTable, setShadow