git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
2f5e2be
Branches
Tags
develop-client_server
master
typescript
fs-words.git
server
lib
plankton
json
logic-impl.js
[mod] server:lib:plankton
Christian Fraß
commited
2f5e2be
at 2021-03-12 22:01:27
logic-impl.js
Blame
History
Raw
/* This file is part of »bacterio-plankton:json«. Copyright 2016-2021 'Christian Fraß, Christian Neubauer, Martin Springwald GbR' <info@greenscale.de> »bacterio-plankton:json« is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. »bacterio-plankton:json« is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with »bacterio-plankton:json«. If not, see <http://www.gnu.org/licenses/>. */ var lib_json; (function (lib_json) { /** * @author fenris */ function encode(x, formatted = false) { return JSON.stringify(x, undefined, formatted ? "\t" : undefined); } lib_json.encode = encode; /** * @author fenris */ function decode(x) { return JSON.parse(x); } lib_json.decode = decode; })(lib_json || (lib_json = {})); /* This file is part of »bacterio-plankton:json«. Copyright 2016-2021 'Christian Fraß, Christian Neubauer, Martin Springwald GbR' <info@greenscale.de> »bacterio-plankton:json« is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. »bacterio-plankton:json« is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with »bacterio-plankton:json«. If not, see <http://www.gnu.org/licenses/>. */ var lib_json; (function (lib_json) { /** * @author fenris */ lib_trait.attend("code", "json", { "from": { "name": "any" }, "to": { "name": "string" } }, { "encode": () => (x) => { return lib_json.encode(x); }, "decode": () => (y) => { return lib_json.decode(y); } }); })(lib_json || (lib_json = {})); /* This file is part of »bacterio-plankton:json«. Copyright 2016-2021 'Christian Fraß, Christian Neubauer, Martin Springwald GbR' <info@greenscale.de> »bacterio-plankton:json« is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. »bacterio-plankton:json« is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with »bacterio-plankton:json«. If not, see <http://www.gnu.org/licenses/>. */ var lib_json; (function (lib_json) { /** * @author fenris */ class class_json { /** * @author fenris */ constructor() { } /** * @implementation * @author fenris */ encode(x) { return lib_json.encode(x); } /** * @implementation * @author fenris */ decode(x) { return lib_json.decode(x); } } lib_json.class_json = class_json; })(lib_json || (lib_json = {}));