aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/data/slime/json_format.h
blob: d1e52107526396a96cca0d0a2667c5a580d79e6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "type.h"
#include <vespa/vespalib/data/output.h>
#include <vespa/vespalib/data/input_reader.h>
#include <vespa/vespalib/data/output_writer.h>

namespace vespalib { class Slime; }

namespace vespalib::slime {

struct Inspector;

struct JsonFormat {
    static void encode(const Inspector &inspector, Output &output, bool compact);
    static void encode(const Slime &slime, Output &output, bool compact);
    static size_t decode(Input &input, Slime &slime);
    static size_t decode(const Memory &memory, Slime &slime);
};

} // namespace vespalib::slime