UNPKG

json-type-cli

Version:

High-performance JSON Pointer implementation

19 lines (18 loc) 559 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CliCodecText = void 0; const toLine_1 = require("pojo-dump/lib/toLine"); class CliCodecText { constructor() { this.id = 'text'; this.description = 'Human-readalbe single-line representation of the JSON object'; } encode(value) { const str = (0, toLine_1.toLine)(value); return new TextEncoder().encode(str + '\n'); } decode(bytes) { throw new Error('Not implemented'); } } exports.CliCodecText = CliCodecText;