Compare commits

...

2 Commits

3 changed files with 46 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ lib
, stdenv
, stdenvNoCC
, zlib
, fetchFromGitHub
, scons
@ -9,14 +9,14 @@
, gnutls
}:
stdenv.mkDerivation {
stdenvNoCC.mkDerivation {
pname = "forstio";
version = "0.0.0";
nativeBuildInputs = [
scons
clang_12
clang-tools
clang_15
clang-tools_15
];
buildInputs = [

View File

@ -0,0 +1,17 @@
#include "json.h"
namespace saw {
class json_codec::impl {
public:
};
json_codec::json_codec():
impl_{heap<json_codec::impl>()}
{}
json_codec::~json_codec(){}
}

View File

@ -0,0 +1,25 @@
#pragma once
#include "common.h"
namespace saw {
class json_codec {
public:
struct limits {
size_t depth = 8;
size_t length = 2048;
};
json_codec();
~json_codec();
template<class Schema, class Container>
error encode(typename message<Schema, Container>::reader reader, buffer& buffer);
template<class Schema, class Container>
error decode(typename message<Schema, Container>::builder builder, buffer& buffer, const limits& lim = limits{});
private:
class impl;
own<impl> impl_;
};
}