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
26 inline static const std::string s_openJson = "{";
27
29 inline static const std::string s_closeJson = "}";
30
32 inline static const std::string s_delimiterJson = ", ";
33}
34#endif
35
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 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, '{'