ATLAS Offline Software
Loading...
Searching...
No Matches
IOVDbJsonStringFunctions.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4// @file IOVDbJsonStringFunctions.h
5// @brief Helper functions for create string in JSON format
6// @author Evgeny Alexandrov
7// @date 14 Febrary 2024
8#ifndef IOVDbSvc_IOVDbJsonStringFunctions_h
9#define IOVDbSvc_IOVDbJsonStringFunctions_h
10
11#include <string>
12#include <iostream>
13#include "CoralBase/AttributeList.h"
14#include "CoralBase/AttributeListSpecification.h"
15#include "CoralBase/Attribute.h"
16
17namespace IOVDbNamespace{
18 //class methods
20 std::string jsonAttribute(const coral::Attribute&);
21
23 std::string jsonAttributeList(const coral::AttributeList&);
24
29 std::string stripIovBounds(const std::string& json);
30
32 inline static const std::string s_openJson = "{";
33
35 inline static const std::string s_closeJson = "}";
36
38 inline static const std::string s_delimiterJson = ", ";
39}
40#endif
41
nlohmann::json json
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
static const std::string s_delimiterJson
json standard delimiter ', '
std::string stripIovBounds(const std::string &json)
Remove the "since"/"until" members from a dumpChannelsAsJson channel dump, leaving only payload conte...
std::string jsonAttribute(const coral::Attribute &attr)
Produce a representation of a coral::Attribute as a json string.
static const std::string s_closeJson
json close tag, '}'
static const std::string s_openJson
json open tag, '{'