json-type-cli
Version:
High-performance JSON Pointer implementation
19 lines (18 loc) • 552 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CliCodecTree = void 0;
const toTree_1 = require("pojo-dump/lib/toTree");
class CliCodecTree {
constructor() {
this.id = 'tree';
this.description = 'Human-readable tree representation of the JSON object';
}
encode(value) {
const str = (0, toTree_1.toTree)(value);
return new TextEncoder().encode(str + '\n');
}
decode(bytes) {
throw new Error('Not implemented');
}
}
exports.CliCodecTree = CliCodecTree;